When you use async module, how can you then pass arguments from the previous callback to the next?
Here is an example from the docs on github
async.series({
one: function(callback){
setTimeout(function(){
callback(null, 1);
}, 200);
},
two: function(callback){
setTimeout(function(){
callback(null, 2);
}, 100);
}
},
function(err, results) {
// results is now equal to: {one: 1, two: 2}
});
See Question&Answers more detail:os