title: How to iterate a List of HashMap in jQuery
body: <p>I've a requirement where in I receive a List of HashMap from a database query and I've to display that on the JSP.</p>
  
  <p>The JSON object looks like below:</p>
  
  <pre><code>[
      {"UNIT_NM":"ATLANTA",    "UNIT_CD":"A00"},
      {"UNIT_NM":"ATLANTA CKO","UNIT_CD":"A00"},
      {"UNIT_NM":"DALLAS",     "UNIT_CD":"D00"},
      {"UNIT_NM":"DALLAS CKO", "UNIT_CD":"D00"}
  ]
  </code></pre>
  
  <p>I've to display it in dropdown like:</p>
  
  <pre><code>"&lt;option value='A00'&gt; A00  ATLANTA&lt;/option&gt;";
  "&lt;option value='A00'&gt; A00 ATLANTA CKO&lt;/option&gt;";
  "&lt;option value='D00'&gt; D00 DALLAS&lt;/option&gt;";
  "&lt;option value='D00'&gt; D00 DALLAS CKO&lt;/option&gt;";
  </code></pre>
  
  <p>The JS code is:</p>
  
  <pre><code>$.ajax({
           url:indexContextRoot+"populateManualCsoCodes",
           type:"post",
           async:true,
           success: function(data){
           var listItems= "&lt;option value=''&gt;Please Select&lt;/option&gt;";
           $.each(data, function(key, value) {
                    listItems+= "&lt;option value='" + key + "'&gt;" + value + "&lt;/option&gt;";
           });
               $("#manualCsoCodes").html(listItems);
          }
      });
  </code></pre>
  
  <p>I'm getting the dropdown as:</p>
  
  <pre><code>[object][Object]
  [object][Object]
  [object][Object]
  [object][Object]
  </code></pre>
  
  <p>Any suggestions please!</p>