How do I remove objects from a JavaScript associative array?
Objects in JavaScript can be thought of as associative arrays, mapping keys (properties) to values. To remove a property from an object in JavaScript you use the delete operator: const o = { lastName: ‘foo’ } o.hasOwnProperty(‘lastName’) // true delete o[‘lastName’] o.hasOwnProperty(‘lastName’) // false Note that when delete is applied to an index property of … Read more