JSFiddle - React, Tailwind, and code Playground
HTML
<table>
<td id="first">
<div class="wrapper">
<input name=1></input>
</div>
<input name=2>
<table>
<td id="second">
<input name=3></input>
</td>
</table>
</input>
</td>
</table>
JavaScript
var n = $("#first").find("input").not("td td input")
//var n = document.getElementById ('first').querySelectorAll ('input:not(???)')
console.log (n.length)