I have a json response from the server something like this
{"id":20,"name":"d","jobid":"22","workflow":"Diagnostic","**status**":"COMPLETE"}...
My js function like this,
var oTable = $('#myTable').dataTable({
'sPaginationType': 'sample',
"bStateSave": true,
"bServerSide": true,
"bDestroy": true,
"sAjaxSource": "/someurl"
});
I’m able to display these data in datatable.But
based on the status value in json response , i need to provide images as datatable row value.
(say img1 for status ‘complete’…)..
I have to do this using jquery to display using jquery datatable.
pls help
Simply add image in JSON
if you want to switch image based on status. just switch it by conditional statement.
For example :
then build your json using img variable.