title: callback function argument in javascript / jQuery
body: <p>Trying to go through a book to learn jQuery ui. I run into this code</p>
  
  <pre><code> $("#autocomplete").autocomplete({
       minLength: 2,
       source: function (request, response) {
           $.getJSON("https//api.github.com/search/repositories", {
               q: request.term + " in:name"
           })
               .then(function (data) {
               var matches = $.map(data.items, function (repo) {
                   return repo.full_name;
               });
               response(matches);
           });
       }
   });
  </code></pre>
  
  <p>In the .then(function(data){}), is the data object passed by the result of $.getJSON() function? I checked jQuery API. I think in this case I am dealing with doneFilter callback but the API didn't mention any default object that is passed in the function. Can anyone explain more about this behavior? And why the data object contains a items property? </p>