javascript - Delete property by value -


this question has answer here:

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

Popular posts from this blog

html5 - What is breaking my page when printing? -

c# - must be a non-abstract type with a public parameterless constructor in redis -

ajax - PHP/JSON Login script (Twitter style) not setting sessions -