title: issue with set autoselect value in multiple select box with jquery
body: <p>I am using skote theme and I want to set auto select value in multiple select select box when edit data I have get this multiple select box from this <a href="https://themesbrand.com/skote/layouts/vertical/form-advanced.html" rel="nofollow noreferrer">this</a> for that I am trying below code</p>
  <pre><code>    &lt;select class=&quot;select2 form-control select2-multiple&quot; name=&quot;assign_to[]&quot; multiple=&quot;multiple&quot;                                     data-placeholder=&quot;Choose ...&quot;&gt;
      &lt;option value=&quot;1&quot; data-select2-id=&quot;1&quot;&gt;Admin&lt;/option&gt;
      &lt;option value=&quot;2&quot; data-select2-id=&quot;2&quot;&gt;Admin2&lt;/option&gt;
      &lt;option value=&quot;3&quot; data-select2-id=&quot;3&quot;&gt;Admin3&lt;/option&gt;
  &lt;/select&gt;
  
  
      $(document).on('click','.edittodotask',function(e){
  
      e.preventDefault();
      var id = $(this).attr('id').replace('edittodotask_', '');
      var url = &quot;{{route('task_to_do.edit', ':id')}}&quot;;            
      url = url.replace(&quot;:id&quot;, id);
  
      
      $.ajax({
          type: &quot;get&quot;,
          url: url,
          processData: false,
          contentType: false,
          success: function(response) {
              //response = assign_to: &quot;1, 2&quot;                
              var assign_to = response.assign_to.split(',');                
              $(&quot;#edit_assign_to&quot;).val(assign_to);            
          },
          error: function(data) {
              console.log(data);
  
  
          }
      })
      
  });
  </code></pre>
  <p>when I click on edit button I have get data with ajax and want to set auto select options for that I have make this code</p>
  <p>but it is not set selected value.</p>
  <p>can anybody help me with this</p>