js remove key from object inline code example
Example 1: js delete object in dict
delete myArray[id_to_remove];
Example 2: delete object property vs undefined assignment javascript
a.x = undefined
a.hasOwnProperty("x") // returns true
delete a.x
a.hasOwnProperty("x") // returns false