I'm saving data in the table below: htmlspecialchars($message)
I want to retrieve the data and show it in datatable using javascript with the design that has in the table column.
"columns": [
{ "data": "cpc_id" },
{ "data": "cpc" },
{ "data": "message" },
{ "data": "name" },
{ "data": "active" },
{
"mDataProp": function ( data, type, full, meta) {
var $table_fulldata=JSON.stringify(data);
$return_data='<a class="btn btn-info btn-sm edit-lead-attribute-message" href="#"><i class="fas fa-pencil-alt"></i></a>';
$return_data+='<a style="margin-left: 2px;" class="btn btn-danger btn-sm remove-lead-attribute-message" href="#"><i class="fas fa-trash"></i></a>';
$return_data+="<input type='hidden' name='cpc_id' class='cpc_id' value='"+(data.cpc_id)+"'>";
return $return_data;
}
},
],