How to loop through the Restfulwebserivice using for loop with a single object. and I don't want to use for each loop so how do i do this. i am not able to get the data by using
for(var key in data) {
alert(data[key].hotel_geo_node.name);
if(data.hasOwnProperty(key)){
}
and here is the api { "data": { "4325474491990470056": { "hotel_geo_node": { "name": "The Capitol", "tags": { "hotel_chain_code": [ "nichendgrp" ], "property_type": [ "Hotel" ], "property_budget_category": [ "Luxury" ], "others": [ "goibibo_hotel" ] },
},
"4325474491990470057": {
"hotel_geo_node": {
"name": "The Capitol",
"tags": {
"hotel_chain_code": [
"nichendgrp"
],
"property_type": [
"Hotel"
],
"property_budget_category": [
"Luxury"
],
"others": [
"goibibo_hotel"
]
},
},
"4325474491990470058": {
"hotel_geo_node": {
"name": "The Capitol",
"tags": {
"hotel_chain_code": [
"nichendgrp"
],
"property_type": [
"Hotel"
],
"property_budget_category": [
"Luxury"
],
"others": [
"goibibo_hotel"
]
},
}
}
}