I wanted to use the id for the link but use the name for frontend. For example I wanted to open the files of John but if I click it, the name of John would be taken instead of the id so the result would be localhost/home/user/John. I need to do it like this localhost/home/user/1 but all I know is the data and it would only give the column names. I tried data.id but it didn't work.
data: 'user_str',
name: 'users.name',
"render": function(data, type, row, meta) {
if(type === 'display'){
data = '<a href="/user/' + data + '">'John'</a>';
}
return data;
}