title: Firebase Javascript: How to create list of value
body: <p>This is the list of data in my firebase: </p>
  
  <p><a href="https://i.stack.imgur.com/zHkp2.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/zHkp2.jpg" alt="This is my firebase data"></a></p>
  
  <p>This is my source code:</p>
  
  <pre><code>var keys = firebase.database().ref().child('seller').once('child_added').then(function(datakey){
  
      var makeList = firebase.database().ref('seller/' + datakey.getKey() +'/sellerName').once('value').then(function(snapshot){
          var nama = snapshot.val();
          var button = $('&lt;a href="#sellerLogin" class="ui-btn ui-shadow big" data-transition="pop" style="padding-bottom: 20px; padding-top: 20px";"&gt;'+ nama + '&lt;/a&gt;');
          button.appendTo('#sellerList'); 
      });
  
  });
  </code></pre>
  
  <p>My problem is, when I execute it, it only create a button element for Seller Name 'Miraak' only but not 'Khajiit'. Like this:</p>
  
  <p><a href="https://i.stack.imgur.com/trz02.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/trz02.jpg" alt="enter image description here"></a></p>
  
  <p>I want it to create a list of buttons based on the number of seller in my firebase. Like currently I have two seller, Miraak and Khajiit, I want both of them to appear as button list.</p>