Last active
September 23, 2016 16:54
-
-
Save roberto-butti/e8ba42baeabfbe2e4ef1c59c585e1ebc to your computer and use it in GitHub Desktop.
update loc (lng lat) on mongodb
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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