JSFiddle - React, Tailwind, and code Playground

HTML

<ul class="list"> <li value="1">4</li> <li value="1" >44</li> <li value="1">5</li> <li>55</li> <li>6</li> <li>66</li> </ul>

JavaScript

var whitelist = "1";

//select all the list-item elements and filter them
$('.list').children().filter(function () {

    //returns true if the text of this element is one of the keys in the `whitelist` variable
    return ($(this).val() != whitelist);
}).hide();