Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Help: Searching the region name if it contains a city name in geoname.org JSON files #200

Open
RSwarnkar opened this issue Apr 11, 2020 · 0 comments

Comments

@RSwarnkar
Copy link

RSwarnkar commented Apr 11, 2020

Hello there, I am using jmespath for python 3.x. I am trying to create a query that would return the array of name attribute of region if it contains a specific 'city'. Here is the schema of the JSON.

{
 country-name
 country-code
 regions[
   {
    region-name 
	region-code 
	cities[
	    {city-name, city-lat, city-long},
		{city-name, city-lat, city-long},
	]
   },
   
    {
    region-name 
	region-code 
	cities[
	    {city-name, city-lat, city-long},
		{city-name, city-lat, city-long},
	]
   }
 ]
 }

IN.json.txt

Attaching a sample JSON from Geonames.org for country=India, city=Rampur.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant