JSFiddle - React, Tailwind, and code Playground

by Arun P Johny

HTML

<input type='checkbox' name='a' />A
<input type='checkbox' name='b' checked='checked'/>B
<input type='checkbox' name='c' />C

JavaScript

var attr_str = $('input').serializeArray();

attr_str.push({q:'hello',p:'world'});

$('body').append('<br><br>string='+JSON.stringify(attr_str));