Saturday, 10 June 2017

Decrease variable value of all children firebase

How can I update a child value of all children in Firebase Cloud Functions? I found other answers using regex and AngularFire, and some updating on a single level (this is 2 levels) but is there any way to quickly decrease all child variables of a certain key? For example:

database -
     posts -
       RaNd_0MK3y1-
          variable: x
       RaNd_0MK3y2
          variable: y

and decrease all values of variable by 1 upon calling the Cloud Function?



via Spruce Campbell

No comments:

Post a Comment