Command
db.users.deleteOne({name:'Alice'})
Explanation
Deletes a single document matching the filter. Useful for removing specific unwanted records.
Examples
Delete one product document
db.products.deleteOne({name:'Laptop'})
db.users.deleteOne({name:'Alice'})
Deletes a single document matching the filter. Useful for removing specific unwanted records.
Delete one product document
db.products.deleteOne({name:'Laptop'})