deletemany mongodb code example
Example 1: deletemany mongodb
try {
db.orders.deleteMany( { "client" : "Crude Traders Inc." } );
} catch (e) {
print (e);
}
Example 2: mongodb delete all documents
db.collection.delete_many( { } );
Example 3: delete collection mongodb
db.collection.drop()
Example 4: db.collection.deleteMany(
db.<collection>.deleteMany({"field" : "value"})