我有这样的json数据
{ "aaData" : [
[ { "field1" : "value11", "field2" : "value12", "field3" : "value13" },
{ "field1" : "value21", "field2" : "value22", "field3" : "value33" } ]
]}
如何将这些数据加载到datatable中? 我的init函数看起来像这个
var oTable1 = $('#usertable').dataTable({
"sPaginationType": "bs_full",
"bProcessing" : true,
"sAjaxSource" : "loadusers.html" });
并在html
<table class="datatable table table-striped table-bordered" id="usertable">
<thead>
<th>Field1</th>
<th>Field2</th>
<th>Field3</th>
</thead>
<tbody></tbody>
</table>