title: How to retrieve Firebase key using Angular resource and firebase-admin?
body: <p>I built a RESTful application running node on server side, like express and firebase-admin. I made some API endpoints linked with my Firebase project database.</p>
  
  <p>On client side I am using Angular resource to consume the API. Below is a part of my routes file, where resolves a resource service named 'BeerService':</p>
  
  <pre><code>.state('beers', {
                      url: '/beers',
                      templateUrl: 'app/beer/beer.html',
                      controller: 'BeerCtrl',
                      controllerAs: 'vm',
                      resolve: {
                          beers: function(BeerService) {
                              return BeerService.query(function(data) {
                                  console.info(data);
                                  return data;
                              }, function(error) {
                                  console.error(error);
                                  return error;
                              });
                          }
                      }
                  })
  </code></pre>
  
  <p>It returns <code>data</code> and save it to <code>beers</code>. Then it was injected on my controller and saved in a global variable named <code>vm.beers</code>. On the html there is a ng-repeat (beer in vm.beers) and {{beer}}.</p>
  
  <p>The problem: beer only shows the values from object. How can I get the keys of these nodes?</p>
  
  <p>This is the output of <code>console.info(data)</code> from file above (There is just one record in db with key -KXHTyo8AWFehyJ2iIY_):</p>
  
  <p><a href="https://i.stack.imgur.com/qGJuj.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/qGJuj.png" alt="console output"></a></p>
  
  <p>This is the html:</p>
  
  <pre><code>&lt;h5&gt;GET /api/beers&lt;/h5&gt;
  &lt;button ng-click="vm.queryBeers()" class="mdl-button mdl-js-button mdl-button--raised mdl-js-ripple-effect mdl-button--accent"&gt;
      Refresh
  &lt;/button&gt;
  &lt;ul class="demo-list-item mdl-list"&gt;
      &lt;li class="mdl-list__item" ng-repeat="beer in vm.beers"&gt;
          &lt;span class="mdl-list__item-primary-content"&gt;
              {{beer}}
          &lt;/span&gt;
      &lt;/li&gt;
      {{vm.beers}}
  &lt;/ul&gt;
  </code></pre>
  
  <p>And this is shown:</p>
  
  <p><a href="https://i.stack.imgur.com/cO66t.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/cO66t.png" alt="screen"></a></p>
  
  <p>Could you help me to know how I can get the key from the data (-KXHTyo8AWFehyJ2iIY_)?</p>