Hello, I need help please. How to build a table from my data in Json format using DataTables?
I write this code, but it did not work:
I write this code, but it did not work:
var testdata = '[{"name":"Jhon","age":"23","sex":"M","phone":"210-828-5555"},{"name":"Barack","age":"30","sex":"M","phone":"210-828-4444"}]'; $('#example').dataTable( { "aaData": testdata, "aoColumns": [{ "mDataProp": "name" }, { "mDataProp": "age" }, { "mDataProp": "sex" }, { "mDataProp": "phone" } ] } );Thanks!