Skip to content

Instantly share code, notes, and snippets.

@pablocattaneo
Last active January 14, 2019 11:18
Show Gist options
  • Save pablocattaneo/45950f2f06a87115f6d0a77a17154b87 to your computer and use it in GitHub Desktop.
Save pablocattaneo/45950f2f06a87115f6d0a77a17154b87 to your computer and use it in GitHub Desktop.
How to use ObjectId in mongodbdriver? #mongoDb #mongoDbDriver source: https://stackoverflow.com/a/32170615/3599272
const ObjectId = require('mongodb').ObjectId;
const id = req.params.gonderi_id;
const o_id = new ObjectId(id);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment