Hi,
Could someone advice me how to access JSON-data in deeper levels, for example street and area in this example data. I'm able to read upper level like location and formatted_address but how to access child data of address_components?
{
"results": [
{
"location": "POINT (24.937573 60.160291)",
"address_components": {
"street": "Merimiehenkatu",
"area": "Uusimaa",
"country": "Finland",
"street_nbr": "29",
"post_office": "Helsinki",
"postal_code": "00150",
"country_code": "FI"
},
"formatted_address": "Merimiehenkatu 29, Helsinki, 00150 Uusimaa, Finland",
"location_type": "POINT"
},
{
"location": "POINT (-79.906981 42.991202)",
"address_components": {
"street": "Fourth Line",
"area": "Ontario",
"country": "Canada",
"street_nbr": "00150",
"post_office": "Byng",
"postal_code": "N3W 2G2",
"country_code": "CA"
},
"formatted_address": "00150 Fourth Line, Byng, Ontario N3W 2G2, Canada",
"location_type": "POINT"
},
{
"location": "POINT (21.483384 61.140578)",
"address_components": {
"street": "Merimiehenkatu",
"area": "Satakunta",
"country": "Finland",
"street_nbr": "29",
"post_office": "Rauma",
"postal_code": "26100",
"country_code": "FI"
},
"formatted_address": "Merimiehenkatu 29, Rauma, 26100 Satakunta, Finland",
"location_type": "POINT"
},
{
"location": "POINT (22.954244 59.836179)",
"address_components": {
"street": "Merimiehenkatu",
"area": "Uusimaa",
"country": "Finland",
"street_nbr": "29",
"post_office": "Hanko",
"postal_code": "10900",
"country_code": "FI"
},
"formatted_address": "Merimiehenkatu 29, Hanko, 10900 Uusimaa, Finland",
"location_type": "POINT"
},
{
"location": "POINT (21.401145 60.802559)",
"address_components": {
"street": "Merimiehenkatu",
"area": "Varsinais-Suomi",
"country": "Finland",
"street_nbr": "29",
"post_office": "Uusikaupunki",
"postal_code": "23500",
"country_code": "FI"
},
"formatted_address": "Merimiehenkatu 29, Uusikaupunki, 23500 Varsinais-Suomi, Finland",
"location_type": "POINT"
}
]
}
BR, Hannu
Exactly what I was looking for.
BR, Hannu