title: DataTables warning: table id=example - Requested unknown parameter '1' for row 1, column 1
body: <p>Getting error "DataTables warning: table id=example - Requested unknown parameter '1' for row 1, column 1. For more information about this error, please see <a href="http://datatables.net/tn/4" rel="nofollow noreferrer">http://datatables.net/tn/4</a>" while loading the data from ajax api call the json received from the back end is as below</p>
  
  <pre><code>[{"CustomerName":"Dinesh","product":"23234","perticulars":"wrwer","AddressOfCustomer":"wrew`","ContactNumbers":"jhkjhb"}, {"CustomerName":"dd","product":"dfsdfs","perticulars":"fsdfs","AddressOfCustomer":"sdfsdf","ContactNumbers":"fsfsf"}, {"CustomerName":"Pratik","product":"toothbrush","perticulars":"6 inch","AddressOfCustomer":"shreedhama white rose","ContactNumbers":"9949634396"}]
  </code></pre>
  
  <p>Snippet of HTML div tag for which table data is being populated is as below.</p>
  
  <pre><code>         &lt;table id="example" class="display" align="center" vertical-align="middle"; cellspacing="0" width="100%"&gt;
          &lt;thead&gt;
              &lt;tr&gt;
                  &lt;th&gt;Customer Name&lt;/th&gt;
                  &lt;th&gt;Product&lt;/th&gt;
                  &lt;th&gt;Perticulars&lt;/th&gt;
                  &lt;th&gt;Address of customer.&lt;/th&gt;
                  &lt;th&gt;Contact number&lt;/th&gt;
              &lt;/tr&gt;
          &lt;/thead&gt;
          &lt;tbody&gt;
      &lt;tr&gt;
          &lt;td&gt;&lt;/td&gt;
          &lt;td&gt;&lt;/td&gt;
          &lt;td&gt;&lt;/td&gt;
          &lt;td&gt;&lt;/td&gt;
          &lt;td&gt;&lt;/td&gt;
      &lt;/tr&gt;
  &lt;/tbody&gt;
          &lt;tfoot&gt;
              &lt;tr&gt;
                  &lt;th&gt;Customer Name&lt;/th&gt;
                  &lt;th&gt;Product&lt;/th&gt;
                  &lt;th&gt;Perticulars&lt;/th&gt;
                  &lt;th&gt;Address of customer.&lt;/th&gt;
                  &lt;th&gt;Contact number&lt;/th&gt;
              &lt;/tr&gt;
          &lt;/tfoot&gt;
      &lt;/table&gt;
  </code></pre>
  
  <p>Below is the ajax call I am doing and in success function trying to populate data from the json</p>
  
  <pre><code>        $.ajax({
              url:'AddQuotation',
              type:'get',      
              success:function(data){ 
                       alert(data);
  
                       var resultTable = $('#example').DataTable({
  
                           "columns": [
                           { data: "CustomerName" },
                           { data: "product" },
                           { data: "perticulars" },
                          { data: "AddressOfCustomer" },
                          { data: "ContactNumbers" }
                          ],
                          "destroy": true,
                          "dom": 'lrtip'
                          } );
              resultTable.rows.add(data1).draw();
              dataSet = data;         
               },
               error:function(){
                alert('error');
               }
               });
  </code></pre>