How can i loop throught an array with the below structure with the function for?
My Array is:
{
"cod": "200",
"message": 0.0027,
"city": {
"id": 2264456,
"name": "Portimao",
"coord": {
"lon": -8.53775,
"lat": 37.138561
},
"country": "PT",
"population": 0
},
"cnt": 1,
"list": [{
"dt": 1400328000,
"temp": {
"day": 24.54,
"min": 15.3,
"max": 24.69,
"night": 15.3,
"eve": 23.33,
"morn": 23.33
},
"pressure": 1010.53,
"humidity": 64,
"weather": [{
"id": 800,
"main": "Clear",
"description": "sky is clear",
"icon": "01d"
}],
"speed": 5.17,
"deg": 150,
"clouds": 0
}]
}
My idea is get the array values accessible by doing this:
for(var i = 1; i < data.length; i++) {
data.list[i].temp.max ;
data.list[i].weather[i]icon
}
The thing is... i´m not getting any information inside weather object... it´s undifined!!! Why?