title: Populate select2 dynamically
body: <p>I have a select2 component that works well with ajax </p>
  
  <pre><code>&lt;select id="select_lpr" style="width:100%" multiple="multiple" data-placeholder="Link a project"&gt;&lt;/select&gt;
  </code></pre>
  
  <p>and here is how I pull data while searching</p>
  
  <pre><code>$("#select_lpr").select2({
      minimumInputLength: 2,
      maximumSelectionLength: 5,
      ajax: {
          type  : 'POST',
          url: '../../model/prj.php',
          dataType: 'json',
          delay: 250,
          data: function (term, page) {
              return {
                  wildcardsearch: term, // search term
                  data_limit: 10,
                  data_offset: 0
              };
          },
          processResults: function (data, page) {
              return { results: data.dataset};
          },
          cache: true
      },
      escapeMarkup: function (markup) { return markup; }, // let our custom formatter work
  });
  </code></pre>
  
  <p>Now I need to ensure the select is populated on the page load. I am struggling to understand how this can be achieved. I use the latest version of select2 (Version 4). </p>