How do I push new values to the following array?
json = {\"cool\":\"34.33\",\"alsocool\":\"45454\"}
I tried json.push(\"coolness\":\"
json.push(\"coolness\":\"
That is an object, not an array. So you would do:
var json = { cool: 34.33, alsocool: 45454 }; json.supercool = 3.14159; console.dir(json);