Retrieve random ID key generated by Firebase?
<p>How do I retrieve the random ID key generated by Firebase?</p>

<p>For example, if I have this:</p>

<pre><code>    users
    │
    ├──── KT4NTZTzFduj3DNLQgg
    │     │
    │     ├────  uid: "7ZLldIsRu3NQMOb6"
    │     └────  username: "John"
    │
    │
    └──── TO39dsjk2wREF34kmcs // I want this
          │
          ├────  uid: "455klfmckjsnenk2sxkm2"
          └────  username: "Micheal"
</code></pre>

<p>I want to get the key which holds a username with value equal to Micheal.</p>

<pre><code>firebase.database()
    .ref('users')
    .orderByChild("username")
    .equalTo("Micheal")
    .once("value", 
            function (snapshot) {
                // what should I write here ??
            });
</code></pre>