So I have a table with username and number. I want to search an exact number e.g. 2 but when I use the regular .search() it gets me anything that has the number 2 (22, 12, 2...) in it. I only want to get cells that are == "2" to show up.
Here is what I tried so far but it's not working.
$('#submitbtn').on('click', function() {
var dateselected = $("#contestdate").val();
$('#example').DataTable().column(1).search("^" + dateselected + "$", true, false).draw();
});
Thanks