javascript remove object within object 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: Delete Properties from a JavaScript Object
var ourDog = {
"name": "Camper",
"legs": 4,
"tails": 1,
"friends": ["everything!"],
"bark": "bow-wow"
};
delete ourDog.bark;