title: how to store the select options value and text in an JSON object or Array?
body: <p>I have a select list (sample below). I want to store this select list (text and value) in a JSON object or Array object. So that i can later go thru it using .each function. I want to then show/hide the records in the select option list based on user input. all code is ready and working except that I am not able to figure how to store a select option list with all its text and value pairs into an either Array or JSON object and subsequently able to walk thru it based on text.</p>
  
  <p>thank you.</p>
  
  <pre><code> &lt;select id="mySelect" multiple="multiple"&gt;
      &lt;option value="1"&gt;First&lt;/option&gt;
      &lt;option value="2"&gt;Second&lt;/option&gt;
      &lt;option value="3"&gt;Third&lt;/option&gt;
      &lt;option value="4"&gt;Fourth&lt;/option&gt;
   &lt;/select&gt;
  </code></pre>