I want to get the data from a firebase object how?
<p>Okay, am using firebase I tried some code from the docs that show me how to retrieve data from my DB. Am using the Web Docs Okay
Here is what my DB looks like</p>

<pre><code> MyApp-446464
 users
    foo
     -foobar
       first_name:"foo"
       last_name:"bar"

    bar
     -barfoo
       first_name:"bar"
       last_name:"foo"
</code></pre>

<p>So from the above, I get the object using </p>

<pre><code>firebase.database().ref('users/').once('value').then(function(snapshot) {
   var username = snapshot.val();
});
</code></pre>

<p>But the problem is I can't seem to get the value if I use </p>

<pre><code>username.first_name;
</code></pre>

<p>its giving me undefined can someone assist me with what am doing wrong</p>