Here is the structure of my Json array:
var data =
{
"categories":
{
"category1":
{
"Name": "Maps",
"Id": 3,
"orderInList": 1
},
"category2":
{
"Name": "Books",
"Id": 2,
"orderInList": 2
}
}
};
When I log the 'data' object to the console, the keys are displayed like this:
| key | value |
categories[category1][Id] "3"
I am looking for a way to loop through this data in a for loop (without relying on JQuery's $.each) in order to distinguish between Name, Id, and orderInList pairs. Any suggestions on how to achieve this?