title: POST Array from checkbox via Jquery AJAX
body: <p>I want to send array from checkbox via Jquery AJAX, but the response is not right.</p>
  
  <p>here the html :</p>
  
  <pre><code>&lt;input type="checkbox" id="krs_id_kelas" name="krs_id_kelas[]" value="0ec81bdf-1fc6-447d-ab65-bc67a857d99c"&gt;
  &lt;input type="checkbox" id="krs_id_kelas" name="krs_id_kelas[]" value="173867c3-5721-4aa2-9344-f5ad9fd05537"&gt;
  </code></pre>
  
  <p>Script</p>
  
  <pre><code>$(document).ready(function () {   
  $('#form_krs_kolektif').submit(function (event) {
  
       var formData = {
              'krs_id_prodi': $('#krs_id_prodi').val(), //this part is fine
              'periode': $('#periode_krs option:selected').val(), //this part is fine
              'krs_id_regis_mhs': $('#krs_id_regis_mhs').val(), //this part is fine
              'id_kelas[]': $('#krs_id_kelas:checked').serialize() // only this part has a problem
          };
       $.ajax({
              type: 'POST',
              url: '&lt;?=base_url()?&gt;akademik/proses_krs_kolektif/',
              data: formData,
              dataType: 'json',
              encode: true
          })
  
      event.preventDefault();
      });
  
  }); 
  </code></pre>
  
  <p>When I <code>print_r</code> the POST result from php part, the response from console is like this</p>
  
  <pre><code>Array
  (
      [0] =&gt; krs_id_kelas%5B%5D=0ec81bdf-1fc6-447d-ab65-bc67a857d99c&amp;krs_id_kelas%5B%5D=173867c3-5721-4aa2-9344-f5ad9fd05537
  )
  </code></pre>
  
  <p>What I want is array like this, how can I fix it ?</p>
  
  <pre><code>Array
  (
      [0] =&gt; 0ec81bdf-1fc6-447d-ab65-bc67a857d99c
      [1] =&gt; 173867c3-5721-4aa2-9344-f5ad9fd05537
  )
  </code></pre>