I have the following code:
async.parallel({ one: function(callback) { gps_helper.get_gps(PEMSID, conn, start, stop, function(fullResults){ callback(fullResults); }) }, //query for new dataSet two: function(callback) { admin.getTh(function(gpsThresholds){ callback(gpsThresholds); }) } }, function(results){ console.log(results); console.log('emitting GPS...'); socket.emit('GPS', {gpsResults: results.one, thresholds: results.two, PEMSID: PEMSID, count: count, length: PEMSToDisplay.length, checked: checked}); count++; }); This isn't working, my console displays the first query that finishes in the callback as results. There also is no {one: fullResults, two: gpsThresholds} formatting in the output, it's just displaying the callback value form the respective functions.