I have this JSON:
var myVar = {
"9":"Automotive & Industrial",
"1":"Books",
"7":"Clothing"
};
I want to add a new element at the beginning, I want to end up having this:
var myVar = { "5":"Electronics", "9":"Automotive & Industrial", "1":"Books", "7":"Clothing" };
I tried this but it is not working:
myVar.unshift({"5":"Electronics"});
Thanks!