I have a List of Documents like below which I got it from Mongodb
{
"_id":"some_random_id"
"name": "report1"
"reportDef":
{
"reportParameters":
["a",
"b",
"c",
"d",
"e"
]
}
"type": "CUSTOM"
"reportId": "desiredReport"
}
{
"_id":"some_random_id"
"name": "report1"
"reportDef":
{
"reportParameters":
["e",
"f",
"b",
"y",
"z"
]
}
"type": "CUSTOM"
"reportId": "desiredReport"
}
and I need to remove "b" from the reportParameters if this condition satisfies i.e., if type="CUSTOM" and reportId="desiredReport"
means final json document should be like below
{
"_id":"some_random_id"
"name": "report1"
"reportDef":
{
"reportParameters":
["a",
"c",
"d",
"e"
]
}
"type": "CUSTOM"
"reportId": "desiredReport"
}
{
"_id":"some_random_id"
"name": "report1"
"reportDef":
{
"reportParameters":
["e",
"f",
"y",
"z"
]
}
"type": "CUSTOM"
"reportId": "desiredReport"
}
How to add changeset to achieve this?