Remove a document
Parameter
Description
_id
String | Number
The id of the document that will be removed
User.remove({ _id: 1 }) // true
Or remove a user from find:
const userFound = User.find({ _id: 1 }) userFound.remove() // true
Last updated 2 years ago