I have the data structure as follows:
{
"metadata" : {
"custom_metadata" : [
{
"key_id" : "6052e700dc84ef7d492b5d30",
"type" : "freetext",
"value" : [
"desh",
"Fauji"
]
}
],
"tag_ids" : [ ],
"category_id" : "5a02e20a23dfee730bbd7f4f",
}
}
I want to achieve updating a specific value inside the "value" array here (without knowing its index) using db.update() query. Example: I want to update the above doc to :
{
"metadata" : {
"custom_metadata" : [
{
"key_id" : "6052e700dc84ef7d492b5d30",
"type" : "freetext",
"value" : [
"Desh ki Dharti",
"Fauji"
]
}
],
"tag_ids" : [ ],
"category_id" : "5a02e20a23dfee730bbd7f4f",
}
}