title: get all data from firebase
body: <p>I just started to use firebase   and I am new to the node.js environment
  im trying to send to get data from my database  i got this using this code</p>
  
  <pre><code> var country = sessionStorage.countryname;
   var ref = firebase.database().ref('posts/country/' + country + '/')
  
   ref.on('value', function(snapshot) {
       snapshot.forEach(function(keysSnapshot) {
           var keys = keysSnapshot.val();
  
           console.log('keys', keys);
  
       })
   }); 
  </code></pre>
  
  <p>I got all the data in keys but i dont know how to access it for example i want to get the age and first_name of each post  ..this is what i get in console log</p>
  
  <p><a href="https://i.stack.imgur.com/bDJMP.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/bDJMP.png" alt="console.log"></a></p>
  
  <p>And this is my database 
  <a href="https://i.stack.imgur.com/dDuiC.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/dDuiC.png" alt="database "></a></p>
  
  <p>this is the json code </p>
  
  <pre><code>{
    "country" : {
      "Algeria" : {
        "844kh2QXDHgw7i4KBvULpCSO5KE2" : {
          "-L9MvZxV2bVjcuKGZx-2" : {
  
            "age" : "26",
            "first_name" : "jack",
  
            "gender" : "female",
  
            "home_adress" : "2222222222222222222222222222",
  
            "last_name" : "anonyo",
  
          },
          "-L9Mvpnyx1f9DDDygJcG" : {
  
            "age" : "29",
  
            "first_name" : "jazmine",
  
            "gender" : "female",
  
            "home_adress" : "2222222222222222222222222222",
  
            "last_name" : "anony",
  
          }
        },
        "QgWbVLqInga3JRNuzzlZBCzwkws2" : {
          "-L9ES58GkQcZGywqpIWY" : {
  
            "age" : "29",
  
            "first_name" : "jazmine",
  
            "gender" : "female",
  
            "home_adress" : "2222222222222222222222222222",
  
            "last_name" : "anony",
  
          }
        }
      },
  
      "england" : {
        "jdL079kwJUQSBzKE7aNIPInPEHX2" : {
          "-L925-sxlxsF5k9LZFHp" : {
  
             "age" : "29",
  
            "first_name" : "jessica",
  
            "gender" : "female",
  
            "home_adress" : "2222222222222222222222222222",
  
            "last_name" : "anony",
          }
        }
      }
    }
  }
  </code></pre>