Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

firebase iterate object

firebase.database().ref("profile/user_id").on('value', function(snap){

   snap.forEach(function(childNodes){

      //This loop iterates over children of user_id
      //childNodes.key is key of the children of userid such as (20170710)
      //childNodes.val().name;
      //childNodes.val().time;
      //childNodes.val().rest_time;
      //childNodes.val().interval_time;


  });
});
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #firebase #iterate #object
ADD COMMENT
Topic
Name
9+2 =