JavaScript
$(document).on("click", "#table_name .btn", function(){
let currentRow = $(this).closest("tr");
let index = table.row(currentRow).index();
let row_data = table.rows(index).data()[0];
});