JSFiddle - React, Tailwind, and code Playground
HTML
<input type="checkbox" value="football" name="football" checked>Football</label>
<label>
<input type="checkbox" value="baseball" name="baseball" checked>Baseball</label>
JavaScript
var test = $("input:checked").map(function () {
var obj = {};
obj[$(this).attr('name')] = this.value;
return obj;
}).get();
console.log(test)