I\'m trying to add a key value pair to an existing javascript associative array. The key needs to be a variable. This is for JSON encoding. I realize there are many plugins
An "associative array" is really just an object. You don't use push, you just assign properties to the object:
ary[name] = val;