diff --git a/playground/mongodb-delete.js b/playground/mongodb-delete.js index 4cee234..02e905b 100644 --- a/playground/mongodb-delete.js +++ b/playground/mongodb-delete.js @@ -21,6 +21,13 @@ MongoClient.connect(mongoUrl, (err, db) => { var todo = db.collection("Todos").findOneAndDelete({text: "Something to do"}).then((result) => { console.log(result); }); + db.collection('Users').deleteMany({name: 'Tyrel'}).then((results) => { + console.log(JSON.stringify(results, null, 2)); + }) + + db.collection('Users').findOneAndDelete({_id: new ObjectID('5a1e463bf08a5672016ddd88')}).then((results) => { + console.log(JSON.stringify(results, null, 2)); + }) // db.close(); })