JSFiddle - React, Tailwind, and code Playground
HTML
<input type="text" name="test1" />
<input type="text" name="test2" value="blah2" />
JavaScript
$(function() {
$('input:text[value!=""]').each(function() {
alert(this.name);
});
});