I am calling jquery async calls in for loop like that:
for (var index = 0; index < activeSheets.length; index++) {
service.getAsync().then(donecallback, failcallback);
}
and when I get donecallback, based on data returned i need to run another for loop and run even more calls,
is there any nice simple way to wait till all of them are finished and see if all passed or some failed ?