Within my JSON Array I have an entry with a url 'slug',
another with a 'full name'.
I have the link part working with the columns.render method
however, I'd like to use 'full name' as the link text.
Is it possible to pull this data from the other column and then not display it as a column
Below is how I would expect to have it work, I hope it makes sense. I'm very new to JS.
$('#example').DataTable( {
"processing": true,
"serverSide": false,
"ajax": "example.com/json",
"columns": [
{ "data": "name" },
{ "data": "company" },
{ "data": "profession" },
{ "data": "profession_other" },
{ "data": "location" },
{ "data": "slug" }
],
"columnDefs": [ {
"targets": 5,
"data": "slug",
"data_name": "name",
"render": function ( data, type, row, meta ) {
return '<a href="example.com/member/'+data+'" target="_blank">+data_name+</a>';
}
} ]
} );
I've just edited a previous example to try and illustrate http://live.datatables.net/vijaqizi/1/