title: how to update data in select2 dropdown using ajax
body: <p>I have a select2 dropdown for location.select2 data is initialised on page load.I want to update the data at regular intervals using ajax.But when I update the data of select2 the select2 dropdown becomes read only</p>
  
  <pre><code>    jQuery("#e10_2").select2({
          allowClear: true,
          minimumInputLength: 1,
          data:{ results: locationls, text: function(item) { return item.text; }},
          formatSelection: format,
          formatResult: format
      }); 
  </code></pre>