Skip to content

Instantly share code, notes, and snippets.

@A-gambit
Created February 27, 2016 17:33
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save A-gambit/4d1ab3ae5d54e6d18321 to your computer and use it in GitHub Desktop.
Save A-gambit/4d1ab3ae5d54e6d18321 to your computer and use it in GitHub Desktop.
const cities = $('tr')
.toArray()
.filter(x => x.innerText.includes('°'))
.map(x => ['name', 'lat', 'lng'].reduce((loc, key, i) => {
loc[key] = x.children[i].innerText
return loc
}, {}))
//http://www.mapsofworld.com/lat_long/ukraine-lat-long.html
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment