Recently started digging in to JSON, and I'm currently trying to use a number as "identifier", which doesn't work out too well. foo:"bar"
works fine, while 0:"bar"
doesn't.
var Game = {
status: [
{
0:"val",
1:"val",
2:"val"
},
{
0:"val",
1:"val",
2:"val"
}
]
}
alert(Game.status[0].0);
Is there any way to do it the following way? Something like Game.status[0].0
Would make my life way easier. Of course there's other ways around it, but this way is preferred.