title: jquery collect all option values from select box in a JSON array
body: <p>I have a select box.</p>
  
  <pre><code>&lt;select id='x'&gt;
      &lt;option value='1'&gt;'Vineet'&lt;/option&gt;
      &lt;option value='2'&gt;'Vivek'&lt;/option&gt;
      &lt;option value='3'&gt;'Madhu'&lt;/option&gt;
  &lt;/select&gt;
  </code></pre>
  
  <p>The options are added dynamically to it. At the end, I want to collect the values of ALL option elements contained within this select box into an array. I searched the forum for the answer, but Q/A are there for getting the 'selected' option only.</p>
  
  <p>I tried this:</p>
  
  <pre><code>var myList = [];
  $('#x').each(function() { myList.push( $(this).value() ) });
  </code></pre>
  
  <p>In firebug, It gives this error:</p>
  
  <blockquote>
    <p>missing } after property list</p>
  </blockquote>
  
  <p>But I fail to see any missing <code>}</code>. What am I doing wrong here?</p>