Reputation: 81
How to get value from hidden input type array my input is below and i am trying this code
<input type="hidden" name="POSITION[]" value="10">
var arr= $('input[type="hidden"][name="POSITION[]"]').val();
Upvotes: 2
Views: 1494
Reputation: 402
Try this code
var arr = $('input[type="hidden"][name="POSITION[]"]').map(function(){
return this.getAttribute("value");
}).get();
Upvotes: 4