0

Is it possible to update a Firebase document only when it meets a where condition?

Something like

firebase.firestore()
        .collection('friends')
        .where('name', '==', 'Steven')
        .update({
          name: "Steve"
        })

or do I have to make a query, save all doc id's and update them after I collected the ids?

Thanks in advance.

Frank van Puffelen
  • 499,950
  • 69
  • 739
  • 734
PRSHL
  • 626
  • 1
  • 7
  • 19

0 Answers0