Skip to content

Tag: geonames

Geonames api loop and get city name

How can i get only all city names (eg… Lisbon, Porto, Aveiro…) contained in the array? Here is a sample of the array: Answer For starters, that is a pretty ugly way to get at the data, as you are encoding json data that is already json, and then looping on just pieces of that resulting mangled str…