delete one mongo code example
Example 1: mongodb deleteOne
db.<collection>.deleteOne({name : "John" }) *delete one document with the name john*
Example 2: deletemany mongodb
try {
db.orders.deleteMany( { "client" : "Crude Traders Inc." } );
} catch (e) {
print (e);
}