I\'ve got a database that looks like this:
I want to reset the Patient_List
and Current_Token
children to 0 at a particular time (
It's not possible to have a single update statement affect a child of all database nodes under some location. You will have to iterate all the nodes (by querying/reading them somehow), then update each one that you find. This is potentially a costly operation in terns of bandwidth.
Only use the general ref, and before that reference all nodes that you want to update, just like this:
var gralRef = firebase.database().ref();
var obj_update={};
obj_update[`users/${firstuser}/name`]='John';
obj_update[`users/${seconduser}/name`]='Mark';
obj_update[`users/${seconduser}/address`]='New York';
gralRef.update(obj_update);