var arrInputValues = new Array();
$("input[name='table\\[\\]']").each(function(){
arrInputValues.push($(this).val());
});
Your arrInputValues values now contain all the values.
You can also use
$("input[name='table[]']").each(function(){
You can see a working demo.
You can use the join () method to combine values into an array.
arrInputValues.join(',');
joins the elements of the array as a string separated by a character ,.
source
share