JSFiddle - React, Tailwind, and code Playground

HTML

<table>
    <tr class="toplevel" data-id="3">
        <td>With Top Level</td>
    </tr>
    <tr data-id="3">
        <td>With out Top Level</td>
    </tr>
    <tr data-id="3">
        <td>With out Top Level</td>
    </tr>
    <tr data-id="2">
        <td>With out Top Level and data-id 2</td>
    </tr>
     <tr data-id="2" class="toplevel">
        <td>With Top Level and data-d 2</td>
    </tr>
</table>

CSS

.noHover {
    color:red;
    background-color:#cecece;
}
.hover {
    color:blue;
    background-color:yellow;
}

JavaScript

$(document).ready(function () {

   $('tr:not(.toplevel)[data-id="3"]').hide();

});