4

I have list of appointments stored in firebase collection, how can I delete a specific appointment ?

enter image description here

1 Answer 1

5

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:

  1. Load the document into your application code.
  2. Get the entire array from the document.
  3. Remove the item from the array.
  4. Write the entire array back to the document in the database.
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.