Posting jquery datatable data to server in JSON format
<p>I know this question has been asked numerous times on SO and on the datatables site, but i cannot get it to work using the solutions provided.</p>

<p>I am building my datatable on the client side and now want to post the client data to my wep api controller in json format.</p>

<p>The client side is working correctly when it comes to adding/deleting rows.
But when i try create my JSON using:</p>

<pre><code>    var table = $('#detailTable').DataTable();
var details = JSON.stringify(table.rows().data().toArray());
</code></pre>

<p>I am getting the following result: </p>

<pre><code>[["11046","ABC","bis","123","123",15129]]
</code></pre>

<p>so basically i am missing column names in my JSON object, thus the web api is failing to pick it up and convert it to:</p>

<pre><code>List&lt;ReceiptEntryViewModel&gt; ReceiptDetails
</code></pre>

<p>So how can i get the datatables to generate a JSON in the following format:</p>

<pre><code>[["ItemId":"11046","ItemCode":"ABC","ItemName":"bis","Price":"123","Quantity":"123","Total":15129]]
</code></pre>