title: how to properly encode a form into json using jquery
body: <p>I did this</p>
  
  <pre><code>let myform = $('#myapp-product-submit-form');
  let jsonFormData = JSON.stringify(myform.serializeArray());
  $.post( '/coaltechtest' , jsonFormData , function(datas){
  </code></pre>
  
  <p>problem:</p>
  
  <p>the result contains a hundred name value pairs, e.g. written out</p>
  
  <pre><code>{
  'name': 'product_name',
  'value': 'some cool product name'
  ...}
  </code></pre>
  
  <p>but i want</p>
  
  <pre><code>{
  'product_name': 'some cool product name'
  }
  </code></pre>