I want to update a mongo collection property, which is a list. I want to add a item per update in to the list.
{ _id:3, items:[] }
now i just simply want to add item to the items list by updating the collection many times.
Quoting an example straight from the docs
db.students.update( { _id: 1 }, { $push: { scores: 89 } } )
So in your case it would be
db.your-collection.update{ {_id:3}, {$push: {items:<your-value>} }
1.4m articles
1.4m replys
5 comments
56.8k users