mongodb remove multiple elements from array code example
Example 1: mongodb add multiple element to array
db.students.update(
{ name: "joe" },
{ $push: { scores: { $each: [ 90, 92, 85 ] } } }
)
Example 2: drop multiple database mongo
// if you have a list of Databases to delete then you may run the following command?
['db1', 'db2', 'db3', 'db4'].forEach(function(i){db.getSiblingDB(i).dropDatabase()})