Double Values in Datatables Json/Ajax

Double Values in Datatables Json/Ajax

xallxall Posts: 4Questions: 3Answers: 0

Hello,
I've a WebService that sends alot Json data like this:
"quality":"XX","tag":"xx\/xx\/xx","timestamp":"xx","value":xx"
Now when I read the output from the webservice directy everything is ok no double values.
but when I use datatables like this:

function getjson(datass, startto, starttd, bis, testt) {

$(function () {

show_loading();

datatab=$('#reservations').DataTable({

"ajax": {

"url": datass,

"dataSrc": ""

},

"fnInitComplete": function (oSettings, json) { close_loading(); if (!init) {init=true } },

"columns": [

{ "data": "timestamp" },

{ "data": "tag" },

{ "data": "value" },

{ "data": "quality" }

]

});

});

}

The first values in the datatabe are ok but the last are always wrong they come twice.

This is like this

Timestamp | Tag | Value | Quality
11.01.2015 10:52:00 | A | A | A
11.01.2015 10:52:01 | B | B | B
....
...
....
11.02.2015 08:30:00 | X | X | X
11.02.2015 08:30:00 | X | X | X
11.02.2015 08:30:01 | Y | Y | Y
11.02.2015 08:30:01 | Y | Y | Y
11.02.2015 08:30:02 | Z | Z | Z
11.02.2015 08:30:02 | Z | Z | Z

Answers

  • xallxall Posts: 4Questions: 3Answers: 0

    sorry the table is like this:

    Timestamp | Tag | Value | Quality

    11.01.2015 10:52:00 | A | A | A

    11.01.2015 10:52:01 | B | B | B

    ....

    ...

    ....

    11.02.2015 08:30:00 | X | X | X

    11.02.2015 08:30:00 | X | X | X

    11.02.2015 08:30:01 | Y | Y | Y

    11.02.2015 08:30:01 | Y | Y | Y

    11.02.2015 08:30:02 | Z | Z | Z

    11.02.2015 08:30:02 | Z | Z | Z

This discussion has been closed.