Trying to update in MongoDB nested object Document
"items" : [
{
"id": 1,
"name" : "a",
"child" : [
{ "id" : 11, "name": "aa"},
{ "id" : 12, "name": "bb"},
]
},
]
}
Need to update the child id to 13 whose name is "aa",
O/P, which I am trying to get
"items" : [
{
"id": 1,
"name" : "a",
"child" : [
{ "id" : 13, "name": "aa"},
{ "id" : 12, "name": "bb"},
]
},
]
}