I have code like this.
var key = \"anything\"; var object = { key: \"key attribute\" };
I want to know if there is a way to rep
Well, there isn't a "direct" way to do this...
but this should do it:
json[key] = json.key; json.key = undefined;
Its a bit tricky, but hey, it works!