title: How to retrieve nested child value in Firebase database using javaScript?
body: <p>Here is my Fireabse database structure. I want to retrieve data of <code>20170116</code> keys that is not a hard coded value. It's dynamic keys. I got some keys and values like :</p>
  
  <p>This is my funtion :  </p>
  
  <pre><code>function getData(prospectId) {
      database.ref('users/'+prospectId).once('value').then(function(snapshot) {
          var prospectId = snapshot.key ;
          console.log("prospectId : "+ prospectId); // output is : prospectId : 1104812
  
          snapshot.forEach(function(childSnapshot) {
              var businessUrl = childSnapshot.key;
              console.log("businessUrl : "+ businessUrl); // output is : businessUrl : http:\\www.abc.com
              var dates = Object.keys(childSnapshot.val());
              console.log("dates : "+ dates); //output is : dates : 20170116,20170117,20170119,20170121
              var singleDate = dates[0];
              console.log("singleDate : "+ singleDate); //output is : singleDate : 20170116
          });
      });
  }  
  
  getData(1104812);
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/3Hk34.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/3Hk34.png" alt="Here is my Fireabse database structure"></a></p>
  
  <p>So how to get <code>20170116</code> date data or snapshot ?</p>