Is there any way to customize the response data?
Is there any way to customize the response data?
strayling
Posts: 10Questions: 1Answers: 0
Is there any way to customize the default "recordsTotal/recordsFiltered" key?
This problem sucked me for a couple of hours.
I'm so tired to solve it, but i can't find a solution.
Help me please.
This discussion has been closed.
Answers
My data is something like:
{"data":{
"totalCount":7,
"rows":[{"id":1,"placeId":"2714ac088a5343959f48a3c8d9d4250a","placeName":""}]
}}
Because the data is created by somebody else, I can't change it.
I thought datatable is the strongest plugin of tables.
This problem is so small that I can't imagine it would heppen in this plugin......
Do you mean this:
http://datatables.net/examples/basic_init/language.html
?
The default key showing how many matched datas is recordsTotal, and it have to be setted on the top level of the response object. {"recordsTotal":"fef"}, but now, my data structure is {data:{ "totalCount":7, "rows"[]}
Finally I solve it by adding an api. Oh shit!! Really a wate of time.