title: get value by json array
body: <p>I am fetching some data from database and want to show these values in a combo in javascript but combo box is not populating any value, perhaps i am doing something wrong in json or javascript, can anybody tell me where i am wrong? From db 5 values are coming in while loop </p>
  
  <pre><code>JSONObject jsonObj= new JSONObject(); 
  
  List&lt;String&gt; myList = new ArrayList&lt;String&gt;();
  while(rs.next()){
  t1=rs.getString(1);
  myList.add(t1);
   jsonObj.put("name",myList.toArray());
  }
  response.setContentType("application/json");
  response.getWriter().write(jsonObj.toString());
  </code></pre>
  
  <p>want to get above values in javascript</p>
  
  <pre><code>&lt;script type="text/javascript"&gt;
    $(document).ready(function() {
  $("#combo").change(function() {
  $.getJSON('combo.jsp', {count : this.value}, function(responseData) {
  $("#combo1").empty().append ("&lt;option&gt;please select&lt;/option&gt;");
  var json = $.parseJSON(responseData);
  var myValues = json.name;
  for (var idx in myValues) {
  $("#combo1").append(
      $("&lt;option&gt;&lt;/option&gt;").html(myValues[idx]).val(myValues[idx])
  );
  }
  });
  });          
      &lt;/script&gt;
  </code></pre>
  
  <p>Please anybody give me some idea at least, i am not able to find any solution</p>