Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

the update operation document must contain atomic operators mongodb

db.getCollection('users')
  .updateMany(
  {'name':{'$exists':1}}, //Query
  {'$set': { //Values to update
    'name':'New Name'
  	}
  }
)
 
PREVIOUS NEXT
Tagged: #update #operation #document #atomic #operators #mongodb
ADD COMMENT
Topic
Name
5+6 =