I been reading a little about the jquery when and done functionality, but what is the best way to handle an arbitrary number of requests:
var t = [];
_.each(searchData.get("products"), function(productId, index){
fetchingProduct = App.request("product:entity", productId);
$.when(fetchingProduct).done(function(product){
t.push(product);
});
});
console.log(t);
This does obviously not work, but how would I construct something simlilar that will?
Thanks