title: How to send multiple Select2 value to ther server in ajax Parameter
body: <p>I am using a select2 drop-down in my wep page, I want to send selected value to the servlet using ajax parameter, I tried below Ajax but it's not working for me.</p>
  
  <p>My HTML <code>Select</code> Code     </p>
  
  <pre><code>&lt;select class="form-control select2" id="color" name="color" multiple="multiple" data-placeholder="Select Colors"&gt;
      &lt;option&gt;Red&lt;/option&gt;
      &lt;option&gt;Blue&lt;/option&gt;
      &lt;option&gt;Green&lt;/option&gt;
      &lt;option&gt;Gray&lt;/option&gt;
  &lt;/select&gt;
  </code></pre>
  
  <p>My <code>Ajax</code> Code:</p>
  
  <pre><code>     $.ajax({
           type: 'POST',
           url: 'MyServerUrl',                                
           data: {
              color: $("#color").select2('data') 
              },
           success: function (data, textStatus, jqXHR){
           },
           error: function (data, textStatus, jqXHR) {
           }
       });
  </code></pre>
  
  <p>Is there any way to send Direct object to Ajax Parameter?</p>