How to get all the values of input array element jquery [duplicate]
This question already has an answer here: how to store textbox values in array using jquery? 2 answers Here is my html input elements <input type="text" name="pname[]" value="" /> <input type="text" name="pname[]" value="" /> <input type="text" name="pname[]" value="" /> <input type="text" name="pname[]" value="" /> <input type="text" name="pname[]" value="" /> <input type="text" name="pname[]" value="" /> How can I get all the values of pname array using Jquery By Using map var values = $("input[name='pname[]']") .map(function(){return $(this).val();}).get(); You can use .map() . Pass each