I want to check every object in the pronunciations
array and check if the likes
array in each object contains remove_this
, then remove it from every likes
array.
{
"_id": "5a052785aa06c22429717bad",
"word": "wordtest5",
"__v": 0,
"pronunciations": [
{
"pronunciation": "wordtest1",
"_id": "5a052785aa06c22429717bae",
"likes": [
"remove_this",
"5a0508cfcf4f6620786a3cb1"
],
"rating": 1
},
{
"pronunciation": "wordtest5",
"_id": "5a0674c1053ae929db3a576c",
"likes": [],
"rating": 1
},
{
"pronunciation": "testing5",
"_id": "5a06770346be3d2ac6f31561",
"likes": [
"remove_this",
"5a0508cfcf4f6620786a3cb1",
],
"rating": 1
}
]
}
I want to remove all remove_this
strings inside every likes
array.