title: How to get jQuery ajax data in the complete function?
body: <p>I know that this is known topic and one of the solutions is to change the call to be synchronous.
  Still it is not clear to me if there is any other way to do it async and obtain the data in the complete function?
  The example function creates a new asset object in success function and I want to obtain the reference to it in complete function.</p>
  
  <pre><code>        function getPresentation(item) {
          $.ajax({
              type: "GET",
              url: item.Url,
              success: function (data) {
                  assets.push(new asset(item.Type, item.Url, data));
              },
              complete: function () {
                  /// How to get here the reference for the newly created asset object?
                  /// how to alert(asset)?
              },
              error: function (req, status, error) {
                  alert('error');
              }
          });
  
      }
  </code></pre>