javascript - Delete property by value -
this question has answer here:
- how remove property javascript object? 25 answers
i have object this:
var names = { 45: "jeff", 145: "peter", 11: "dandie", 879: "michael" }
how remove "peter" object?
try this
delete names['145'];
or
delete names.145;
Comments
Post a Comment