Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

how to update mongodb collection with a new field

db.collection.updateMany({}, {$set: {"fieldName": ""}})
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #update #mongodb #collection #field
ADD COMMENT
Topic
Name
8+7 =