title: Return value with async function
body: <p>Right now I have a piece of code which makes two http requests in parallel.</p>
  
  <pre><code>var request = require('request');
  var async = require('async');
  var fs = require('fs');
  
  module.exports = {
      req : function(options) {
          //populate list with 2 lookups
          var lookup_list = [];
          for (var i = 0; i &lt; 2; i++) {
              if(i == 1) {
                  options.timeout = 200;
              }
              lookup_list.push(options);
          }
          //iterate through list with and do request calls
           async.map(lookup_list, function(options, next) {
              request(options, function (error, response, body) {
                  if (!error &amp;&amp; response.statusCode == 200) {
                      var body = JSON.parse(body);
                      next(null, body);
                  } else {
                      next(error || response.statusCode);
                  }
              });
              //after both requests are finished, deal with responses
          }, function(err, results) {
              if (!err) {
                  console.log(results);
                  /*
                   fs.appendFile('log.txt', JSON.stringify(results[1]) + "\n",function callback(error){
                   if (error) {
                   return console.error('write failed: ', error);
                   }
                   });
                   */
              } else {
                  console.error('request failed: ', err);
              }
          });
      }
  }
  </code></pre>
  
  <p>I want a to return the array results from the async.map callback when parallel.req() is called. </p>
  
  <p>I've tried to provide a callback for req() and have it be called in the callback for async.map but no luck. I also tried other returns and callbacks elsewhere but have had no success. I would like some guidance to resolve this issue.</p>