title: select2 I don't want to get data out of json
body: <p>My script won't load any data in the Select2. I made data from laravel controller with response JSON data, this result json</p>
  
  <pre><code>
  
    "results": [
      {
        "id": 1,
        "code": "11",
        "name": "jackson",
      },
      {
        "id": 2,
        "code": "12",
        "name": "michael,
  
      },
  </code></pre>
  
  <p>this my script code</p>
  
  <pre><code>$('.name_user').select2({
        width: "100%",
        placeholder: "Search...",
          ajax: {
            url: "{{route('name_user')}}",
            processResults: function(data) {
              return {
                results: $.map(data, function(obj) {
                  return {
                    id: obj.id,
                    name: obj.name
                  };
                })
              };
            },
            cache: true
          }
  
        });
  
  </code></pre>
  
  <p>How do I get data from route name_user?</p>