title: How to return an array of children from firebase in React-Native
body: <p>My Firebase data base contains JSON objects, each with the same parameters as seen below. <a href="https://i.stack.imgur.com/X5mGl.png" rel="nofollow noreferrer">Firebase data</a></p>
  
  <p>I want to get an array that has each objects country. So if I have 4,000 objects I want to get an array of 4,000 strings all containing a country. </p>
  
  <p>Right now I can get the console to log all the 4,000 objects into an array using the code below.</p>
  
  <pre><code>componentWillMount() {
     this.fetchData();
  }
  fetchData = async () =&gt; {
      var data1 = [];
      var fireBaseResponse = firebase.database().ref();
      fireBaseResponse.once('value').then(snapshot =&gt; {
          snapshot.forEach(item =&gt; {
              var temp = item.val();
              data1.push(temp);
              return false;
     });
     console.log(data1);
     });
  }
  </code></pre>
  
  <p>But when I try doing </p>
  
  <pre><code> var fireBaseResponse = firebase.database().ref().child('country');
  </code></pre>
  
  <p>I get an array of nothing. </p>
  
  <p>Any help would be great. </p>