Skip to content

Instantly share code, notes, and snippets.

@roberto-butti
Last active September 23, 2016 16:54
Show Gist options
  • Save roberto-butti/e8ba42baeabfbe2e4ef1c59c585e1ebc to your computer and use it in GitHub Desktop.
Save roberto-butti/e8ba42baeabfbe2e4ef1c59c585e1ebc to your computer and use it in GitHub Desktop.
update loc (lng lat) on mongodb
db.tollbooth.find().forEach(function (item) {
loc = [item.lng, item.lat]
// print(loc)
item.loc= loc
print(item)
db.tollbooth.save(item)
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment