I want to loop through a list and make an API-request for each value. I want the request to be made synchronously, so the 2nd request should start when the first finished. However i want them to be async so UI does not freeze.
How can do i do that with an each loop and an ajax request:
$.each(resultList, function (i, e) {
$.ajax({
type: 'GET',
data: {
_rnd: new Date().getTime()
},
url: saveResultUrl + '?data=' + e,
dataType: 'json',
async: true,
})
});