Advertisement
Guest User

Untitled

a guest
Jun 16th, 2019
77
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.57 KB | None | 0 0
  1. some_ref1.once('value', function(snapshot){
  2. // x is going to be a list
  3. var x = snapshot.val();
  4. // looping through x
  5. for (var i = 0; i < x.length; i++){
  6. // do something and get another list y
  7.  
  8. // loop through y
  9. for (var j=0; j<y.length; j++){
  10. // go to firebase again
  11. some_ref2 = firebase.database().ref("some_other_location");
  12. some_other_location.once('value', function(snapshot)){
  13. var final_output = snapshot.val();
  14. console.log(final_output);
  15. }
  16. }
  17. }
  18. })
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement