views:

69

answers:

1

Consider var person=JSON.parse('{"name":"Alice","id",1234}').

How do I remove a key from the variable person? For example, how do I remove "name" completely, so that person becoems {"id":1234}?

+4  A: 

Try delete person["name"]

Konamiman