title: Set the first option select2
body: <p>I want to set the first position to select2 dropdown by default, I have tried this but It doens´t work:</p>
  
  <pre><code>$('#mylist').val($('#mylist option:first-child').val()).trigger('change');
  </code></pre>
  
  <p>Other way that I tried;</p>
  
  <pre><code>$('#mylist').val(1);
  </code></pre>
  
  <p>But the problem is I don´t know what value is, because it is depend from a query and It will not always be the same value.</p>
  
  <p>I did not set the dropdown values ​​from the HTML, but it is an input hidden and the values ​​are loaded in a query</p>
  
  <p>I hope that anyone can help me</p>
  
  <p>Regards!</p>