title: Select2 JQuery's AJAX Method from example is not working
body: <p>I want to create a search input field using select2.js 4.0.5. I looked at the <a href="https://select2.org/data-sources/ajax" rel="nofollow noreferrer">select2 example</a> and basically, want to learn by recreating them without using the template result (only return text).</p>
  
  <p>However, I cannot make it work. This is the closest I can get: <a href="https://jsfiddle.net/Lcedbxvp/23/" rel="nofollow noreferrer">myJSFiddle</a>. </p>
  
  <pre><code>$(document).ready(function() {
    $(".js-data-example-ajax").select2({
      ajax: {
        url: "https://api.github.com/search/repositories",
        dataType: 'json',
        delay: 250,
        data: function(params) {
          return {
            q: params.term, // search term
            page: params.page
          };
        },
        processResults: function(data, params) {
          // parse the results into the format expected by Select2
          // since we are using custom formatting functions we do not need to
          // alter the remote JSON data, except to indicate that infinite
          // scrolling can be used
          params.page = params.page || 1;
  
          return {
            results: data.items,
            pagination: {
              more: (params.page * 30) &lt; data.total_count
            }
          };
        },
        cache: true
      }
    });
  });
  </code></pre>
  
  <p>Even copying directly everything from the example does not work: <a href="https://jsfiddle.net/Lcedbxvp/25/" rel="nofollow noreferrer">exampleJSFiddle</a>.</p>
  
  <p>I am still new to JS and Ajax. I'm sure that I'm missing something. Could someone please explain what am I missing?</p>