i have a Json object that basicly is a array and in each array i want to iterate over the propertys, so i did something like this:
for(var x = 0;x<dados.feeds.length;x++){
for(var y in dados.feeds[x]){
console.log(dados.feeds[x][y]);
/*if(data == dataInicial){
console.log("a");
}*/
}
}
that console.log(dados.feeds[x][0]
) gives me undefined, i just want the first element on each x row, how can i get it ?
json object dados
{
"channel":
{
"id": 9,
"name": "my_house",
"description": "Netduino Plus connected to sensors around the house",
"latitude": "40.44",
"longitude": "-79.996",
"field1": "Light",
"field2": "Outside Temperature",
"created_at": "2010-12-13T20:20:06-05:00",
"updated_at": "2014-02-26T12:43:04-05:00",
"last_entry_id": 6060625
},
"feeds":
[
{
"created_at": "2014-02-26T12:42:49-05:00",
"entry_id": 6060624,
"field1": "188",
"field2": "25.902335456475583"
},
{
"created_at": "2014-02-26T12:43:04-05:00",
"entry_id": 6060625,
"field1": "164",
"field2": "25.222929936305732"
}
]
}