Using nodejs, mongoskin.. I'd like to return the updated doc so Im using findAndModify, however the query {_id: "someid"} doesn't work. I think I need to use {id: ObjectID{'someid'} as the query. How do I get the ObjectId type into JS?
try this:
ObjectID = require('mongoskin').ObjectID
{_id: new ObjectID("someid")}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With