I have the following situation:
var foo = [ 0, 1, 2 ] for (var i in foo) { Asyncstuff.get(URI).on(\'response\', function(res) { console.log(i); } }); } <
Using recursive pattern loop with node.js
please refer my answer , am sure you can use this to solve your problem as you have the control over for loop