delete an object from object in javascript code example
Example 1: delete kvp object
// remove key-value pair from object
let person = {
name: 'Bob',
age: 34
};
delete person['age'];
console.log(person); // { name: 'Bob' }
Example 2: javascript remove property from object
var person = {"first_name": "Billy","last_name": "Johnson"};
delete person.last_name; //delete last_name property