Skip to content

Instantly share code, notes, and snippets.

@deltaepsilon
Created November 2, 2016 00:57
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save deltaepsilon/816756a121338ab0ec6b0f1b56f4b801 to your computer and use it in GitHub Desktop.
Save deltaepsilon/816756a121338ab0ec6b0f1b56f4b801 to your computer and use it in GitHub Desktop.
var userRef = ref.child(‘users/’ + userId);
var userTransactionsRef = ref.child(‘transactions/’ + userId);
Promise.all([
 userRef.once(‘value’),
 userTransactionsRef.once(‘value’)
]).then(function (snaps) {
 var user = snaps[0].val();
 var userTransactions = snaps[1].val();
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment