If I were to have a Json file that looked something like this:
{
"numbers":{
"firstnum":"one",
"secondnum":"two",
"thirdnum":"three",
"fourthnum":"four",
"fifthnum":"five"
}
}
and I wanted to get the value of the third number (three) using JavaScript. Instead of doing...
jsonObject.numbers.thirdnum
Is there a way I can select that value using some sort of children or index method? for example something kind of like this...
jsonObject.numbers.children[2]