title: Filling Option List With Data Returned From JSON Request
body: <p>I have a JSON response form the server the response is an List Object with three columns. However to fill the select option list i only need to use two. I am able to receive the data on the client however i am unable to fill the select option list.</p>
  
  <p><strong>Jquery</strong></p>
  
  <pre><code>$("select#offenceCatId").change(function(){
  
      $.ajax({
          type:'GET',
          url:'getCrimeTypeList.htm',
          data:{crimeCatId: $(this).val()},
  
          headers: {
              Accept: 'application/json'
          },
          dataType: 'json',
          success:function(data){
              var crimeType = JSON.stringify(data);
              var options = '';
  
              for (var i = 0; i &lt; crimeType.length; i++) {
                  options += '&lt;option value="' + crimeType.crimeTypeId[i] + '"&gt;' + crimeType.crimeTypeDesc[i] + '&lt;/option&gt;';
              }
              $("select#offenceTypeId").html(options);
          }
      });
  });
  </code></pre>
  
  <p><strong>JSON Data</strong></p>
  
  <p>[{"crimeTypeDesc":"Incitement To Murder","crimeCatId":4,"crimeTypeId":39},{"crimeTypeDesc":"Sexual and Non Sexual Assults","crimeCatId":4,"crimeTypeId":40},{"crimeTypeDesc":"Pornography","crimeCatId":4,"crimeTypeId":41},{"crimeTypeDesc":"Censorship","crimeCatId":4,"crimeTypeId":42},{"crimeTypeDesc":"Statutory Rape","crimeCatId":4,"crimeTypeId":43},{"crimeTypeDesc":"Criminal Transmission Of HIV","crimeCatId":4,"crimeTypeId":44},{"crimeTypeDesc":"Adultery","crimeCatId":4,"crimeTypeId":45}]</p>
  
  <p>I only need to fill the select option list with the crimeTypeDesc and crimeTypeId</p>
  
  <p><strong>Error</strong>
  TypeError: crimeType.crimeTypeId is undefined     </p>