DataTables and json
DataTables and json
Hey.
I am using dataTables and json in ajax/serverside processing.
The aaData that I return is being manipulated by me.
For example:
Instead of returning 'dog', I need to return dog.
That's fine - and dataTables works great there.
The thing is that I need to write dog.
As you can see - I need ' and ", but it gets in the way of the json ".
How can I handle this situation?
Many thanks!
I am using dataTables and json in ajax/serverside processing.
The aaData that I return is being manipulated by me.
For example:
Instead of returning 'dog', I need to return dog.
That's fine - and dataTables works great there.
The thing is that I need to write dog.
As you can see - I need ' and ", but it gets in the way of the json ".
How can I handle this situation?
Many thanks!
This discussion has been closed.
Replies
What I did in order to solve the double quotes problem is : I wrote \" .
The escape char \ before the double quotes is used for the json to "ignor" the double quotes and only write the data as quotes instead of treating them as quotes.
Thanks anyway:)