Answers for "mongodb push array of objects"

0

insert item into list mongodb

db.col.update(
    { name: 'doc', 'list.id': 2 }, 
    {$push: {'list.$.items': {id: 5, name: 'item5'}}}
)
Posted by: Guest on December-05-2020
-2

how to push array in mongodb

pushing to mongodb
Posted by: Guest on October-08-2021

Code answers related to "mongodb push array of objects"

Browse Popular Code Answers by Language