You can do:
resultData.data[3] = {"name4" : "value4"}
That would add a new element on the 4th position.
And like Sigorilla just answered before me, .push()
will always add it one the end of your object.
You don't need to do resultData["data"].push()
though, as you can just use resultData.data.push()
I think.