How to use this jQuery search filter more effective? This is my code:

function search() {
    $("#myInput").keyup(function() {
        var value = this.value.toLowerCase();

        $("table").find("tr").each(function(index) {
            if (index === 0) return;
            var id = $(this).find("td").first().text().toLowerCase();
            $(this).toggle(id.indexOf(value) !== -1);
        });
    });
}

function searchFilt(value) {
    $("table").find("tr").each(function(index) {
        if (index === 0) return;
        var id = $(this).find("td").first().text();
        $(this).toggle(id.indexOf(value) !== -1);
    });
};


However I have used:

$("table").find("tr").each(function(index) {
            if (index === 0) return;
            var id = $(this).find("td").first().text().toLowerCase();
            $(this).toggle(id.indexOf(value) !== -1);
        });
    });


twice, and I am sure there would be a more effective way to do this. However I am not sure how to go about doing so - any advice?
In the function searchFilt you are using a parameter value, similar to the block of code in the search function. You can just call the searchFilt function from within the search function and pass the variable value:

function search() {
    $("#myInput").keyup(function() {
        var value = this.value.toLowerCase();
        searchFilt(value);
    });
}

function searchFilt(value) {
    $("table").find("tr").each(function(index) {
        if (index === 0) return;
        var id = $(this).find("td").first().text();
        $(this).toggle(id.indexOf(value) !== -1);
    });
}


Note: you don't exactly use the code twice, inside the search function you have .toLowerCase() at the end of the line where you get the id.