deleteone mongodb code example
Example 1: mongodb deleteOne
db.<collection>.deleteOne({name : "John" }) *delete one document with the name john*
Example 2: deleteOne mongoose
Tank.deleteOne({ size: 'large' }, function (err) {
if (err) return handleError(err);
// deleted at most one tank document
});