how to delete all documents in mongodb by partcular field code example
Example 1: remove property mongodb
db.myCollection.update({}, {$unset: {fieldToRemove:1}} , {multi: true});
Example 2: mongodb delete all documents
db.collection.delete_many( { } );