I have problem fetching key values of inner levels of object.
This is the sample object
{
"dataset":{
"Categories":[
{
"Desserts":[
"Sweets",
"Ice Creams",
"Pastry",
"Moose",
"Jelly",
"Donut",
"Custard",
"Puddings",
"Cookies",
"Pies"
]
},
{
"Juices and Beverages":[
"Cold",
"Hot",
"Fresh",
"Mocktail",
"Sodas"
]
},
{
"Indian Breads":[
"Plain",
"Stuffed"
]
},
{
"Salads":[
"Green",
"Vegetable",
"Fruit"
]
},
{
"Soups":[
"Clear",
"Thick"
]
}
]
}
}
I tried interating through the object on the outer level.
for(var k in dataset.Categories)
categories.push(k);
But I get the result as 0,1,2,3,4.
How do I get the key values a level inside? Like "Desserts","Juices and Beverages",....