I have JSON like this:
{
"cod":"200",
"message":0.0085,
"cnt":37,
"list":[
{
"dt":1492074000,
"main":{
"temp":8.74,
"temp_min":8.39,
"temp_max":8.74,
"pressure":1002.4,
"sea_level":1023.01,
"grnd_level":1002.4,
"humidity":94,
"temp_kf":0.35
},
"weather":[
{
"id":500,
"main":"Rain",
"description":"Lekki deszcz",
"icon":"10d"
}
],
"clouds":{
"all":32
},
(...)
JSON.parse(json.list[0]['weather'][0].description);
//OR
JSON.parse(json.list[0]['weather'][0]['description']);
I get nothing. But if I want to access int in this array "id":500, everything is okay.
JSON.parse(json.list[0]['weather'][0].id);
So it looks like a problem with parsing a String in this specific example.