title: Datatables Requested unknown parameter '0' for row 0, column 0
body: <p>I am getting the following error when trying to fill a Datatable using ajax: DataTables warning: table id=employeeTable - Requested unknown parameter '0' for row 0, column 0. For more information about this error, please see <a href="http://datatables.net/tn/4" rel="nofollow noreferrer">http://datatables.net/tn/4</a>.
  The table actually has the correct number of rows, but all rows are empty. The output rows look like this: </p>
  
  <pre><code>&lt;tr role="row" class="odd"&gt;&lt;td class="sorting_1"&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;/td&gt;&lt;td&gt;&lt;/td&gt;&lt;/tr&gt;
  &lt;tr role="row" class="even"&gt;&lt;td class="sorting_1"&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;/td&gt;&lt;td&gt;&lt;/td&gt;&lt;/tr&gt;
  </code></pre>
  
  <p>There are quite some answers to this issue out there, but none seems to fix my issue. The code I use is:</p>
  
  <pre><code>function fillEmployeeTable(store_nr,week_limit) {
    $('#employeeTable').DataTable( {
      "ajax": {
        "method": "GET",
        "url": "api/employeetable/data",
        "data": {
          "store_nr": store_nr,
          "week_limit": week_limit,
        },
        "columns": [
                { "data": "function_name" },
                { "data": "register_id" },
                { "data": "age" },
                { "data": "contract_until" },
                { "data": "worked_hours" },
                { "data": "days" },
                { "data": "costs" },
                { "data": "hourly_rate" },
                { "data": "contract_from" }
            ]
      }
    });
  }
  </code></pre>
  
  <p>With the following HTML</p>
  
  <pre><code>&lt;table class="table" id="employeeTable"&gt;
  &lt;thead&gt;
  &lt;tr&gt;
  &lt;th&gt;function_name&lt;/th&gt;
  &lt;th&gt;register_id&lt;/th&gt;
  &lt;th&gt;age&lt;/th&gt;
  &lt;th&gt;contract_until&lt;/th&gt;
  &lt;th &gt;worked_hours&lt;/th&gt;
  &lt;th&gt;days&lt;/th&gt;
  &lt;th&gt;costs&lt;/th&gt;
  &lt;th&gt;hourly_rate&lt;/th&gt;
  &lt;th&gt;contract_from&lt;/th&gt;
  &lt;/tr&gt;
  &lt;/thead&gt;
  &lt;/table&gt;
  &lt;/div&gt;
  
  (document).ready(function() {
    fillEmployeeTable({{default}})
  });
  </code></pre>
  
  <p>And the JSON data returned is:</p>
  
  <pre><code>{"data": [{"function_name": "Y", "register_id": "1", "age": 26, "contract_from": "01-07-18", "contract_until": "31-12-99", "worked_hours": 1, "days": 9, "costs": 7, "hourly_rate": 2}, {"function_name": "X", "register_id": "1", "age": 18, "contract_from": "24-01-18", "contract_until": "31-07-18", "worked_hours": 486.25, "days": 76, "costs": 1, "hourly_rate": 2}]}
  </code></pre>
  
  <p>Does anyone have an idea how I can solve this?</p>