title: Return array from callback function
body: <p>After a few hours of thinking and googleing, I seem to be unable to find a solution to this stupid simple problem!  </p>
  
  <p>I'm trying to a create an array of JSON objects in order to insert them into DB. But due to Async aspect of Nodejs it has become a little bit complicated.</p>
  
  <p>What I have:  </p>
  
  <pre><code>function foo (arg) {
      request({url: arg}, function(err, response, results){
          var chunk = [];
          var r = JSON.parse(results);
          (r.bar).forEach(function(item){
              geocoder.reverse({lat: item.lat, lon: item.lng}, function(err, res){
                  chunk.push(res[0].formattedAddress;
              });
          });
          console.log(chunk); \\ This is eventually empty!
          insertData(chunk); \\ useless due to chunk being empty!
      });
  </code></pre>
  
  <p>I was wondering how could I make this happen (construct an array and insert it into DB)?</p>
  
  <p>I'm desperate please help.<br>
  Thanks in advance,</p>