title: How to serialize the checkbox in a form into Json data
body: <p>We know that in MVC, a <code>CheckBoxFor</code> will generate a <code>checkbox</code> with a <code>value="true"</code> and a <code>hidden</code> with a <code>value=false</code>. Both input controls will share the same name. </p>
  
  <p>It is very reasonable because the form will be able to POST a false value if the box is unchecked. And the model binder will ignore the hidden input when the checkbox return a true.</p>
  
  <p>But now i have overridden the form submit event in order to send the form data into a WebAPI controller in JSON format. </p>
  
  <p>When serializing the form data, there is no mechanism to parse the relationship between the checkbox and the hidden correctly. Therefore, when unchecked, it returns a <code>false</code>, which is okay. But when checked, it returns a <code>{true, false}</code> instead of <code>true</code>, because the <code>serializeArray()</code> function goes through every <code>input</code> and find two values goes to a same name.</p>
  
  <p>The question is: What is the best way to correct it?</p>