[Vuejs]-Update Firebase Array using.where(). But, getting error ".update isn't a function

1👍

where() returns a Query object, which doesn’t have an update() method, as you can see from the linked API documentation. Since there is no guarantee how many documents could result from executing a query, you will have to get() the query, then iterate the results to find a DocumentSnapshot that matches document, use its ref property to get a DocumentReference for it, and finally update() the document using that DocumentReference.

Leave a comment