title: Firebase - get single element form database
body: <p>I try getting value from specific item form database. But when I use solution from documentation, then I getting specific value but from all items.</p>
  
  <p>Ionic 4
  Firebase realtime database</p>
  
  <p>Database structure:</p>
  
  <pre><code>https://.......com/projectName/bills/
  -Lh-LgSqR1vSANRnA09G{
  amount: xxx
  name: xxx
  }
  -Lh-LhZachVgF7rnqW-1{
  amount: xxx
  name: xxx
  }
  -Lh-LiyC3ve4DrKmdTEj{
  amount: xxx
  name: xxx
  }
  </code></pre>
  
  <pre><code>  getKey(){
      var refKey = firebase.database().ref('bills');
      refKey.once('value', function(snapshot){
        snapshot.forEach(function(childSnap){
          var billKey = childSnap.key;
          console.log('Key 1 ' + billKey);
  
        });
      });
    }
  </code></pre>
  
  <p>And I getting this result:</p>
  
  <pre><code>Key 1 -Lh-LgSqR1vSANRnA09G
  Key 1 -Lh-LhZachVgF7rnqW-1
  Key 1 -Lh-LiyC3ve4DrKmdTEj
  </code></pre>
  
  <p>Keys are good, but for all items.</p>
  
  <p>I want get only one key for clicked element, not keys for all items in my database.</p>
  
  <p><strong>UPDATE:</strong></p>
  
  <pre class="lang-html prettyprint-override"><code>&lt;ion-item style="color: grey;" *ngFor='let bill of myService.bills' slot='start' lines='none' (click)='getKey()'&gt;
  &lt;p&gt;  {{bill.name}}:  {{ bill.amount}} zł  &lt;/p&gt;
  &lt;/ion-item&gt;
  </code></pre>