Answers for "how to remove key value pair from object in javascript"

39

how to remove key value pair from object js

var person = {"first_name": "Billy","last_name": "Johnson"};
delete person.last_name; //delete last_name property
Posted by: Guest on July-19-2019
6

how to remove key value pair from object in javascript

delete object.keyname;
Posted by: Guest on December-18-2019
5

javascript remove object key

var obj = {a: 5, b: 3};
delete obj["a"];
console.log(obj); // {b: 3}
Posted by: Guest on June-03-2020

Code answers related to "how to remove key value pair from object in javascript"

Code answers related to "Javascript"

Browse Popular Code Answers by Language