160
rated 0 times
[
164]
[
4]
/ answers: 1 / hits: 22541
/ 12 Years ago, mon, may 21, 2012, 12:00:00
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!
More From » json