I have this type of html:
<input id='a1' name='a1' value='111' class='hey'/>
<input id='b1' name='b1' value='222' class='hey'/>
<input id='c1' name='b1' value='333' class='hey'/>
and I need to obtain this json from it:
{ a1: '111', b1: '222', c1: '333' }
anybody knows how ?
That should be pretty easy:
There are serialization routines supplied by jQuery to (for example) vaccuum up a whole form, but in a case like this it’s pretty easy to just roll your own.