How to delete a specific array element in firebase collection?
273
If you know the exact value for each field of the array item, you can use FieldValue.remove
to remove that item from the array.
If you don't know all values of the item, the only way to remove the item is to:
- Load the document into your application code.
- Get the entire array from the document.
- Remove the item from the array.
- Write the entire array back to the document in the database.
Author by