title: How to create json by JavaScript for loop?
body: <p>I have <strong>array</strong> of select tag.</p>
  
  <pre><code>&lt;select id='uniqueID' name="status"&gt;
        &lt;option value="1"&gt;Present&lt;/option&gt;
        &lt;option value="2"&gt;Absent&lt;/option&gt;
   &lt;/select&gt;
  </code></pre>
  
  <p>and I want to create a json object having two fields 'uniqueIDofSelect and optionValue' in JavaScript.</p>
  
  <p>I use getElementsByName("status") and I iterate on it.</p>
  
  <p><strong>EDIT</strong></p>
  
  <p>I need out put like</p>
  
  <pre><code>[{"selectID":2,"OptionValue":"2"},
  {"selectID":4,"optionvalue":"1"}]
  </code></pre>
  
  <p>and so on... </p>