title: How do i get the "retArr" array out from this firebase collection query function. I want the array values to used for another function
body: <pre><code>db.collection("City").get().then(function(querySnapshot) {
      querySnapshot.forEach(function(doc) {
      db.collection("users").where("City", "==", doc.id).get().then(function(querySnapshot) {
          var jgy_usercount = querySnapshot.size;
          retArr.push(jgy_usercount);
        });
      });
  });
  </code></pre>
  
  <p>The retArr has the number of users per city that is stored in the array. this array i need to use elsewhere out of the function. How can retrieve it? </p>