I am trying to load remote JSON file into dynatables, but dynatables won't show any data.
here's my table
<table class="table table-striped" id="myTable">
<thead>
<th>orgid</th>
<th>uniqusers</th>
<th>transacs</th>
<th>traffic</th>
<th>advthreats</th>
<th>malware</th>
<th>org_name</th>
<th>domain</th>
<th>partner</th>
</thead>
<tbody>
</tbody>
</table>
and here's my script
$(document).ready(function() {
$('#myTable').dynatable({
dataset: {
ajax: true,
ajaxOnLoad: true,
ajaxUrl: 'betafile.json',
records: []
}
});
});
and JSON file data
{"records": [{"orgid":5529306,"uniqusers":"58","transacs":"11448173","traffic":"412234 033129","advthreats":"28832","malware":"61","org_name":"Education Futures Group","domain":"vistacollege.edu","partner":"Teknas, Inc."}, {"orgid":8140488,"uniqusers":"7","transacs":"13101121","traffic":"39907320 0170","advthreats":"13093","malware":"10","org_name":"Newham College of Further Education","domain":"newham.ac.uk","partner":"iCritical"}, {"orgid":11621785,"uniqusers":"8","transacs":"56850","traffic":"1011450886 ","advthreats":"5","malware":"0","org_name":"Limerick Education Centre","domain":"lec.ie","partner":"iCritical"},
{"orgid":5529306,"uniqusers":"58","transacs":"11448173","traffic":"4122340 33129","advthreats":"28832","malware":"61","org_name":"Education Futures Group","domain":"vistacollege.edu","partner":"Teknas, Inc."},
{"orgid":5529306,"uniqusers":"58","transacs":"11448173","traffic":"4122340 33129","advthreats":"28832","malware":"61","org_name":"Education Futures Group","domain":"vistacollege.edu","partner":"Teknas, Inc."},
{"orgid":5529306,"uniqusers":"58","transacs":"11448173","traffic":"4122340 33129","advthreats":"28832","malware":"61","org_name":"Education Futures Group","domain":"vistacollege.edu","partner":"Teknas, Inc."},
{"orgid":5529306,"uniqusers":"58","transacs":"11448173","traffic":"4122340 33129","advthreats":"28832","malware":"61","org_name":"Education Futures Group","domain":"vistacollege.edu","partner":"Teknas, Inc."},
{"orgid":5529306,"uniqusers":"58","transacs":"11448173","traffic":"4122340 33129","advthreats":"28832","malware":"61","org_name":"Education Futures Group","domain":"vistacollege.edu","partner":"Teknas, Inc."},
{"orgid":5529306,"uniqusers":"58","transacs":"11448173","traffic":"4122340 33129","advthreats":"28832","malware":"61","org_name":"Education Futures Group","domain":"vistacollege.edu","partner":"Teknas, Inc."},
{"orgid":5529306,"uniqusers":"58","transacs":"11448173","traffic":"4122340 33129","advthreats":"28832","malware":"61","org_name":"Education Futures Group","domain":"vistacollege.edu","partner":"Teknas, Inc."},
{"orgid":5529306,"uniqusers":"58","transacs":"11448173","traffic":"4122340 33129","advthreats":"28832","malware":"61","org_name":"Education Futures Group","domain":"vistacollege.edu","partner":"Teknas, Inc."},
{"orgid":5529306,"uniqusers":"58","transacs":"11448173","traffic":"4122340 33129","advthreats":"28832","malware":"61","org_name":"Education Futures Group","domain":"vistacollege.edu","partner":"Teknas, Inctest."}],"queryRecordCount":"10","totalRecordCount":"12"}
please help
Try change your thead data attributes, like this (it worked for me) :