Using $.Deferred() with nested ajax calls in a loop Using $.Deferred() with nested ajax calls in a loop ajax ajax