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
  • 565,676
  • 79
  • 828
  • 807
PRSHL
  • 1,359
  • 1
  • 11
  • 30

0 Answers0