0

I have my firestore database with each user having their list of clients. Each item of that list is an object with properties and I have an 'appointment' property which is a list of objects. I want to allow the user to set an appointment for its client but I can't figure it out. I am able to create a new object but I don't know how to update an array in a document in firestore. Can you help?

Mamoudou Kane
  • 141
  • 2
  • 7
  • You can't **update** an item in an array field in Firestore with a single operation. You'll have to: 1) read the document and get the array from it, 2) update the array in your application code, 3) write the entire array back to Firestore. – Frank van Puffelen Dec 21 '22 at 14:50

0 Answers0