I want to read the values from a select dropdown in jquery and populate into an array of objects where each object has a Text property and a Value property.
What is the best way to do this using jquery?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You’d want to select on the options in a select, then loop them with
$.eachOr, you can more succinctly use
$.map:DEMO