How can I use Cloud Functions for Firebase database triggers to edit/update existing data?
My Use Case:
I have existing data in my Firebase database, say a/{uid}/b
, at the time of writing, I have 14-15 uids in the db where b
is already defined. Now I want to use cloud function to listen to write to b
and add some more data based on that.
The database trigger functions.database.ref('/a/{uid}/b').onWrite
will only execute for new writes/updates to the specific path, not for existing writes/updates.
How can Cloud Functions for Firebase help when I want to update all the data at once for existing write logics?