I have a Json string from which I\'m able to extract few components like formatted_address
,lat
,lng
, but I\'m unable to extract feature(val
You need to understand schema of your data.
Error in json_st['results']['address_components']
because json_st['results'] is an array
Check it here http://jsoneditoronline.org
Here is some sample
for result in data['results']:
print type(result)
for address_component in result['address_components']:
print type(address_component)
print address_component['long_name']
print address_component['short_name']
for _type in address_component['types']:
print _type