Skip to content

Instantly share code, notes, and snippets.

@roberto-butti
Last active September 23, 2016 17:06
Show Gist options
  • Save roberto-butti/9e1266acaefdf35230354f40a44ffa22 to your computer and use it in GitHub Desktop.
Save roberto-butti/9e1266acaefdf35230354f40a44ffa22 to your computer and use it in GitHub Desktop.
db.tollbooth.find().forEach(function (item) {
name = item.name
mysplit = name.split(" - ")
item.route = mysplit[0]
db.tollbooth.save(item)
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment