Create for every document in the collection a new field
by sij /
db.articles.update({}, {$set:{"categories":[]}},{"multi":true})
Source
https://docs.mongodb.com/manual/reference/method/db.collection.update/
db.articles.update({}, {$set:{"categories":[]}},{"multi":true})
https://docs.mongodb.com/manual/reference/method/db.collection.update/