JSFiddle - React, Tailwind, and code Playground
HTML
<input type="checkbox" name="First" tag="first@whatever.com" checked="checked">
<input type="checkbox" name="Second" tag="" checked="checked">
JavaScript
var result = $(":checkbox:checked[tag]");
alert("total matches: " + result.length);