im trying to output the arrays associated with the test
variable:
$(document).on('click','#btnSubmit', function(){
var test = $("input[name*='i_name']");
$(test).each(function(i, item){
var sample = [];
sample.push($(item).val());
});
});
and display all the data i got into a textbox:
<input type="text" id="test" name="test[]">
how will i do it it? i tried JSON.stringify
, .join
but it only displays the last index of the array. please assist me.