I have a document with the following structure:
{
"email" : "[email protected]",
"value" : 100,
"children" : [
{
"email" : "[email protected]",
"value" : 100
},
{
"email" : "[email protected]",
"value" : 200
}
]
}
I want to remove all elements with the email [email protected] from the children array. I am able to remove one item if I pass the whole object to be removed like this:
FieldValue.arrayRemove(childObject)
But I want both the objects with the email [email protected] to be removed. Is there anyway to achieve this using FieldValue.arrayRemove()?