JSFiddle - React, Tailwind, and code Playground
HTML
<input type="text" name="box1" value="foo" />
<input type="text" name="box2" value="bar" />
<input type="text" name="box2" value="man" />
<input type="text" name="box2" value="tree" />
JavaScript
$(document).ready(function() {
$('input[type=text]').each(function() {
if ($(this).val() == "foo") {
$(this).remove();
}
});
});