Hello folks struggling with this updatation Any one can please help out here
"sheet_types": [
{
"areas": [
"FRONT",
"SIDE",
"UPPER"
]
}
]
}
I need to update the value of UPPER to TOP here
I have tried this query
db.company_settings.updateOne(
{"sheet_types.areas": "UPPER" },
{ $set: { "sheet_types.$.areas" : "TOP" } })
But the result i getting is
{
"sheet_types": [
{
"areas": [
"TOP"
]
}
]
}