title: set select options from JSON array
body: <p>I get the following JSON returned from a JQUERY getJSON call:</p>
  
  <pre><code>{                               
  "status": "Succes",             
  "type": "GPS",                  
  "serial": "40332",              
  "crat": "C3",                   
  "ata": "34",                    
  "time": "0",                    
  "dates": ["30/09/14","01/10/14"]
  }  
  </code></pre>
  
  <p><strong>I want to iterate through the dates and set a select drop down with the date values.</strong></p>
  
  <p>I am happy to do this in standard JavaScript or JQuery.</p>
  
  <p>I have tried a number of options but none seem to work.</p>
  
  <p>The page has this section of code:</p>
  
  <pre><code>&lt;select name="adddate"&gt;
    &lt;option value="---"&gt;--- Select A Date ---&lt;/option&gt;
  &lt;/select&gt;
  </code></pre>
  
  <p>In my javascript in the getJSON success function this is the latest code I tried.</p>
  
  <pre><code>var strDates = data.dates;       
  var arrayDates = new Array();    
  arrayDates = strDates.split(",");
  </code></pre>
  
  <p>I have tried other methods but none have worked and I have removed them now.</p>
  
  <p>I have code that sets other inputs with the other items in the JSON data and that is working.</p>
  
  <p>It is just extracting the array of dates and adding each item as an option for the select that I cannot figure out.</p>