mongodb adding a document to a user code example
Example 1: mongodb add user
use <your database>
db.createUser({
user: '<some username>',
pwd: passwordPrompt(),
roles: [{
role: 'readWrite',
db: '<your database>'
}]
})
Example 2: insert property multiple documents mongodb
db.myCollection.update({}, {$set: {"isOpen": false}}, false, true)