Here is the javascript code under the finished function
$('#myDatatable').dataTable({ sAjaxSource : 'jsonfiledemo.txt' });
Here is the html table
<table id="myDatatable"> <thead> <tr> <th>data heading 1</th> <th>data heading 2</th> <th>data heading 3</th> </tr> </thead> <tbody> </tbody>
jsonfiledemo.txt jsone file
{ "sEcho": 0, "iTotalRecords": "34635", "iTotalDisplayRecords": "34635", "aaData": [ [ "title1", "another handling...", "Authored" ], [ "new title", "Cookies are used to track valid session on internet websites. another...", "Authored", "-" ] ] }
source share