get city from geocoder results?

Got this working in the end using: var arrAddress = item.address_components; var itemRoute=””; var itemLocality=”; var itemCountry=”; var itemPc=””; var itemSnumber=””; // iterate through address_component array $.each(arrAddress, function (i, address_component) { console.log(‘address_component:’+i); if (address_component.types[0] == “route”){ console.log(i+”: route:”+address_component.long_name); itemRoute = address_component.long_name; } if (address_component.types[0] == “locality”){ console.log(“town:”+address_component.long_name); itemLocality = address_component.long_name; } if (address_component.types[0] == “country”){ … Read more