How to the get the _id property of a freshly inserted MongoDB entry
Node's mongo driver appends the returned _id
field to the original object reference.
myCollection.insert(myObject, () => {
const {_id } = myObject
return _id;
})
Node's mongo driver appends the returned _id
field to the original object reference.
myCollection.insert(myObject, () => {
const {_id } = myObject
return _id;
})