How to search and display with render
How to search and display with render

Hi!
Can anyone help me with a string to search and display all numbers in a column that starts with a zero. Attached code is ok but just search and displays the specific number, otherwise it displays an url in that row.
"columnDefs": [ {
"targets": 7,
"data": "book",
"render": function ( data, type, full, meta ) {
return data == '0156' ? '0156' : '<a href="'+data+'">Book online</a>';
}
} ]
This question has an accepted answers - jump to answer
Answers
Thanks rf1234! Works like a charm.