I see this in Mongodb $push in nested array
What playlist.$.music represent.??
db.collection.update(
{ "_id": ID, "playlists._id": "58"},
{ "$push":
{"playlists.$.musics":
{
"name": "test name",
"duration": "4.00"
}
}
}
)
my collection is like this .
"book" : [
{
"name" : "rupesh",
"brand" : [
{
"name" : "classmate",
"price" : [
{
"RS" : 100,
"Dollar" : 12
}
]
}
]
}
]
I want to add new price details like
price : [
{
"RS" : 100,
"Dollar : 12
},
{
"RS" : 150,
"Dollar : 15
}
]
please give me some suggestion