delete from mongo code example
Example 1: delete collection mongodb
db.collection.drop()
Example 2: delete an item from db collection mongodb
db.collection.remove(
<query>,
{
justOne: <boolean>,
writeConcern: <document>
}
)
db.collection.drop()
db.collection.remove(
<query>,
{
justOne: <boolean>,
writeConcern: <document>
}
)