I have the following docs:
{
"_id": "xyz",
"data": {
"cat": {
},
"exec": [
{
"orderNo": "2345",
"status": "pending"
},
{
"orderNo": "8907",
"status": "Approved"
}
]
}
},
{
"_id": "abc",
"data": {
"cat": {
},
"exec": [
{
"orderNo": "0098",
"status": "pending"
},
{
"orderNo": "3456",
"status": "pending"
}
]
}
}
What I intend to do is write a query which would effectively identify the order based on "_id"
and "orderNo"
and update the "status"
to 'Approved'.