mongodb delete data by id in collection code example Example: delete collection mongodb db.collection.drop()