As described in the title, follow the example below:
---- HTML
<form id="nameGenderForm">
<table id="teste">
<tr>
<th >Name</th>
<th >Gender</th>
</tr>
<tr>
<td id="11"><input type="hidden" name="11" value=""></td>
<td id="12"><input type="hidden" name="12" value=""></td>
</tr>
<tr>
<td id="21"><input type="hidden" name="[21].value" value=""></td>
<td id="22"><input type="hidden" name="[22].value" value=""></td>
</tr>
</table>
<input type="submit" />
</form>
---- SCRIPT
$("#nameGenderForm").submit(function(event) {
event.preventDefault();
$("input[name=11]").val("AAAA")
$("input[name=22]").val("BBBB")
//$("input[name=[21].value]").val("FFFF") // aqui: como setar nesse caso?
//$("input[name=[22].value]").val("ZZZZZ")
rawData = $('#teste input:hidden').serializeArray();
var formData = JSON.stringify(rawData);
alert(formData);
});
To facilitate, put it in JSFiddle link