javascript how-do-i-remove-a-property-from-a-javascript-object

JavaScript
var person = {"first_name": "Billy","last_name": "Johnson"};
delete person.last_name; //delete last_name property var person = {
        name: "Harry",
        age: 16,
        gender: "Male"
    };
    
    // Deleting a property completely
    delete person.age;
    alert(person.age); // Outputs: undefined
    console.log(person); // Prints: {name: "Harry", gender: "Male"}var string = "Hello World";
var substring = "Hello";
if (string.indexOf(substring) != -1) {
  //Code here
}
Source

Also in JavaScript: