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