title: how can push select options into array of object
body: <p>how can i push <code>select</code> <code>options</code> into <code>array</code> of <code>objects</code> so that it constitutes a single <code>select box</code>.</p>
  
  <p>i tried this </p>
  
  <pre><code>  &lt;select name="fruit"&gt;
      &lt;option selected="true" value="apple"&gt;apple&lt;/option&gt;
      &lt;option value="banana"&gt;banana&lt;/option&gt;
      &lt;option value="kela"&gt;kela&lt;/option&gt;
   &lt;/select&gt;
  
  
  var fruits = [];
  $('#fruits').find('select').each(function(){
     fruits.push({
       selectName: $(this).attr('name'),
       optionValue: $(this).attr('value')
  
     });
  });
  
  console.log(fruits);
  </code></pre>
  
  <p><strong>my question:</strong>  how to push all <code>options</code> values so that i can get a one <code>select box</code>?  i mean the <code>array object</code> must belong to a single <code>select</code> box</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>var fruits = [];
  $('#fruits').find('select').each(function(){
     fruits.push({
       selectName: $(this).attr('name'),
       optionValue: [] // i want all the options values to be contained either in array or any other way
     
     });
  });
  
  console.log(fruits);</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;script src="https://ajax.googleapis.com/ajax/libs/jquery/2.0.3/jquery.min.js"&gt;&lt;/script&gt;
  &lt;div id="fruits"&gt;
   &lt;select name="fruit"&gt;&lt;option selected="true" value="apple"&gt;apple&lt;/option&gt;&lt;option value="banana"&gt;banana&lt;/option&gt;&lt;option value="kela"&gt;kela&lt;/option&gt;&lt;/select&gt;
   &lt;/div&gt;</code></pre>
  </div>
  </div>
  </p>