How can I update nested arrays value using express and mongoose, a multi-dimensional array, and need to update a single object keys value? Here is my data model
{
"_id":'A'
"media" : {
"pictures" : [
{
"_id" : 'B',
"file_name" : "Uploads\\1625311512442-1_PiHoomzwh9Plr9_GA26JcA.png",
"status" : false
},
{
"_id" : 'C',
"file_name" : "Uploads\\1625311520688-images.jpg",
"status" : false
},
{
"_id" : 'D',
"file_name" : "Uploads\\1625311696037-1_PiHoomzwh9Plr9_GA26JcA.png",
"status" : false
},
]
}
}
{
"_id:"'B'
"media" : {
"pictures" : [
{
"_id" : 'M',
"file_name" : "Uploads\\1625311512442-1_PiHoomzwh9Plr9_GA26JcA.png",
"status" : false
},
]
}
}
Here I want to change the status of the file based on the id and image id. A is the id b is the image id
