My JSON response is like this:
{
"results" : [
{
"address_components" : [
{
"long_name" : "285",
"short_name" : "285",
"types" : [ "street_number" ]
},
{
"long_name" : "Bedford Ave",
"short_name" : "Bedford Ave",
"types" : [ "route" ]
},
{
"long_name" : "Williamsburg",
"short_name" : "Williamsburg",
"types" : [ "neighborhood", "political" ]
},
{
"long_name" : "Brooklyn",
"short_name" : "Brooklyn",
"types" : [ "sublocality", "political" ]
},
I need to get the last value for the Key long_name:
{
"long_name" : "Brooklyn",//i need to get this "Brooklyn"
"short_name" : "Brooklyn",
"types" : [ "sublocality", "political" ]
},
How can i get that although there is a lot of Values with the same key long_name:
NSArray *resultsArray = [responseDict objectForKey:@"results"];//what to do next?
Breaking down:
Equivalent would be:
Breaking down: