Answers for "mongodb push element in nested array"

0

mongodb push element in nested array

db.collection.update(
    { "_id": ID, "playlists._id": "58"},
    { "$push": 
        {"playlists.$.musics": 
            {
                "name": "test name",
                "duration": "4.00"
            }
        }
    }
)
Posted by: Guest on January-20-2021

Code answers related to "mongodb push element in nested array"

Browse Popular Code Answers by Language