My JSON data is:
[
{
"serviceName":"test",
"requestXML":"<soapenvelope><uname>testuser</uname></soapenvelope>"
},
{
"serviceName":"test2",
"requestXML":"<soapenvelope><uname>testuser2</uname></soapenvelope>"
}
]
jQuery code to call to backend which returns this JSON data
var postRequest = $.post(url);
postRequest.done(function( data ) {
$('#tableid').dataTable( {
"processing": true,
destroy: true,
"aaData": data,
"aoColumns": [
{ "data": "serviceName" },
{ "data": "requestXML" },
]
});
});
Now when it is shown on the screen as jQuery DataTable, I wanted the entire XML to be printed as it. But it just prints testuser
instead of the whole XML.
Could anyone please help me with this as what is going wrong?
I have verified my JSON data is going correctly.