title: Form Table Data to JSON string
body: <p>I have a form that has a table with inputs and I need to properly convert it into json array per row. Example:</p>
  
  <pre><code>Id    Name     Gender
  1     John     Male
  2     Rose     Female
  
  Desired output:
  [
    { Id:1, Name: "John", Gender: "Male" },
    { Id:2, Name: "Rose", Gender: "Female" }
  ]
  </code></pre>
  
  <p>Please help me. I use this code</p>
  
  <pre><code>JSON.stringify($('#myform').serializeArray());
  </code></pre>
  
  <p>But it gives me this output:</p>
  
  <pre><code>[
    {\"name\":\"Id\",\"value\":\"1\"},
    {\"name\":\"Name\",\"value\":\"John\"},
    {\"name\":\"Gender\",\"value\":\"Male\"}
  ]
  </code></pre>
  
  <p>See it in action: <a href="https://jsfiddle.net/srssnzj8/2/" rel="nofollow">https://jsfiddle.net/srssnzj8/2/</a></p>