mongodb delete document in collection code example
Example 1: drop a collection in mongodb
db.mycollection.drop()
Example 2: how to delete a document in mongodb
to delete a document
db.games.deleteOne({name:"Snake"})
db.mycollection.drop()
to delete a document
db.games.deleteOne({name:"Snake"})