Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

mongo updatemany query

try {
   db.restaurant.updateMany(
      { violations: { $gt: 4 } },
      { $set: { "Review" : true } }
   );
} catch (e) {
   print(e);
}
Source by docs.mongodb.com #
 
PREVIOUS NEXT
Tagged: #mongo #updatemany #query
ADD COMMENT
Topic
Name
8+9 =