deferred.done () - Add handlers that will be called when the Deferred object resolves.
You do not see that the answer may be caused by the fact that one of the promises is rejected. Try using deferred .then ()
Or the result of cycle 1 and result2 separately
$.each(result1, function(i, value) {
table.append('<tr><td>1</td><td class="txt-oflo">' + value.payment + '</td><td>' + value.username + '</td><td class="txt-oflo">' + value.date + '</td><td><span class="text-success">' + value.price + '</span></td><td><a href=""><button class="btn btn-success">Place</button></a> <a href=""><button class="btn btn-danger">Cancel</button></a></td></tr>');
});
source
share