title: Select2 won't load remote json response
body: <p>I have an API that is called by Select2 (v4.0.5) however the debug message in the console says:</p>
  
  <blockquote>
    <p>Select2: The AJAX results did not return an array in the <code>results</code> key of the response.</p>
  </blockquote>
  
  <p>When I review the documentation at <a href="https://select2.org/data-sources/formats" rel="nofollow noreferrer">Select2's documentation site</a> I seem to be following it correctly. This is the javascript I use on the webpage:</p>
  
  <pre><code>$('#account_id').select2({
    debug: true,
    minimumInputLength: 3,
    dataType: 'json',
    ajax: {
      url: '/api/account-query',
      data: function (params) {
        var query = {
          search: params.term,
          v: "new"
        }
        return query;
      },
    }
  });
  </code></pre>
  
  <p>This is the response from the API (sensitive bits redacted):</p>
  
  <pre><code>{
    "results": [{
      "id": "redacted-1",
      "text": "text redacted 1"
    },{
      "id": "redacted-2",
      "text": "text redacted 2"
    },{
      "id": "redacted-3",
      "text": "text redacted 3"
    },{
      "id": "redacted-4",
      "text": "text redacted 4"
    },{
      "id": "redacted-5",
      "text": "text redacted 5"
    }]
  }
  </code></pre>
  
  <p>If I take the select2 code and supply it with the static json response (without results prepended, just the array) it works just fine.</p>
  
  <p>What am I missing?</p>
  
  <p>Thanks!</p>