I need to be update element inside product array called "available" which is inside an another array called cartItem. Below is my document structure and query params are _id , cartItem.storeId and cartItem.products._id. Help will be much appreciated
{
"_id" : ObjectId("5fa3adffc59bf52b0c8583d7"),
"totalAmount" : "40",
"cartItem" : [
{
"_id" : ObjectId("5fa3adffc59bf52b0c8583d8"),
"storeId" : "5f9c1cbd95252731bc90c2c8",
"storeName" : "Ashapura General Stores",
"storeMobile" : "9987177365",
"products" : [
{
"_id" : "5f9c1d7795252731bc90c2ca",
"title" : "Bourbon",
"quantity" : "1",
"price" : "20",
"available" : "yes"
},
{
"_id" : "5f9c1dca95252731bc90c2cc",
"title" : "Oreo",
"quantity" : "1",
"price" : "20",
"available" : "yes"
}
]
}
],
"address" : "804/2 Sarvoday leela,90 feet road, kanchangaon, Thankurli,mumbai",
"mobile" : "9987177365",
"customerID" : "5f8d3eee9083492d34da7185",
"time" : ISODate("2020-11-05T07:47:11.585Z"),
"status" : "pending",
"__v" : 0
}