title: retrieve key names from firebase react-native
body: <p>I have a little problem regarding Firebase and retrieving names of parent keys. Like in this example I want to get the names of the keys, not their values:</p>
  <p><a href="https://i.stack.imgur.com/cLZ3k.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/cLZ3k.png" alt="quick sample of what I want to archieve" /></a></p>
  <p>Pls have a look in my db how it looks now, its exactly the same like in the JS sandbox:</p>
  <p><a href="https://i.stack.imgur.com/orQ2o.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/orQ2o.png" alt="enter image description here" /></a></p>
  <p>When I try to implement this in my react-native project, basicly with plain JS in this part, it looks like this:</p>
  <pre><code>const sendletter = () =&gt; {
          console.log(&quot;letter send&quot;);
          firebase.database().
          refFromURL(&quot;https://SOMEDATABASE.firebaseio.com/numers&quot;).
          once(&quot;value&quot;).then(snapshot =&gt; {
              for(key in snapshot){
                  console.log(key)
              }
          })
      };
  </code></pre>
  <p>The problem I just face now it the outcome of the console in my IDE:</p>
  <blockquote>
  <p>null letter send node_ ref_ index_ val exportVal toJSON exists child
  hasChild getPriority forEach hasChildren key numChildren getRef ref</p>
  </blockquote>
  <p>I tried to provide you as many pictures so the problem gets really clear and also my goal I want to archieve, to get the key names itself, NOT the values the keys are linked to. Any help would be appriciated!</p>