2

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();
1

1 Answer 1

4

Try this code

var arr = $('input[type="hidden"][name="POSITION[]"]').map(function(){
  return this.getAttribute("value");
}).get();
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.