How to serialize those array input using jquery to
<form id="myform" action="" method="">
<input type="text" name="name[0].basketball">
<input type="text" name="name[0].ball">
<input type="text" name="name[1].basketball">
<input type="text" name="name[1].ball">
</form>
Something looks like this:
[{basketball: 'TestBasketball', Ball: 'TestBall'}, {basketball: 'TestBasketball1', Ball: 'TestBall2'}]
JQuery (This code not working, it just get name[0].basketball: 'TestBasketball')
$('#myform').serializeArray();
serializeArray()cannot give you the output you require. To get that you'd need to build the array manually. I'd suggest looking in tomap()name[0][basketball]format and serialize