Suppose we have only one promise object like below.
var myPromise = $.get(url1);
myPromise.done(function(data){
console.log(data);
});
We are able to access the data from the promise object. Now suppose, we have multiple promise objects resolved via $.when
var multiplePromises = $.when($.get(url1),$.get(url2),$.get(url3));
multiplePromises.done(function(){
});
The above requirement has to be satisfied, that is, only if all the get requests completes, the done part should get executed. But how do I individually get the data response from each get to work with them in the $.when.done() method?
You get them as arguments.