how can i get my json data in my datatable ?
how can i get my json data in my datatable ?
rambomambo
Posts: 3Questions: 2Answers: 0
Json file looks like this
i want 2 columns 1 with time, 1 with days
i have try something but always i got no data in my datatables with error 7
[
{
"time": "00:00:00.70",
"day": "12/10/2014 17:28:55"
},
{
"time": "00:00:03.36",
"day": "12/10/2014 17:28:58"
},
{
"time": "00:00:04.63",
"day": "12/10/2014 17:28:59"
}
]
This discussion has been closed.
Answers
https://datatables.net/forums/discussion/24010/uncaught-type-error-cannot-read-property-error-of-null#latest , you can check this link. It works for you might be. If any error comes, please let me know.
i have changed my file to txt then i works it with
(document).ready(function() {
$('#example').dataTable( {
"ajax": {
"url": "times.txt",
"dataSrc": ""
but im need a json file how can i do this ?
is it possible without PHP ?
Perfectly possible with out PHP. The code you have above should work. If it doesn't please link to a test page showing the problem.
Allan