I have a HTML table from which the user will check the row if they want to perform a particular action on that row.
Rather than creating logic which picks out the key data from the row I wish to store the key values in the value attribute of the input checkbox.
My question is, is this legitimate:
<input type="checkbox" value="{'id': 100, 'postcode': 'WA8 6QF'}" />
This way I can use jQuery selectors to pick out the checked boxes and loop through them, performing the action using the items in the value JSON object.
You can use HTML5
data-*attribute: