title: How to access HashMap values in java script method?
body: <p>Here is my java code</p>
  
  <pre><code>public HashMap&lt;Integer, Integer&gt; getNoOfWidgetsFromUsername(final String username) //vikas- method to get pid from db.
  {
  HashMap&lt;Integer, Integer&gt; obMap = new HashMap&lt;Integer, Integer&gt;();
  int numwidgets=getTotalWidgetsOfUser(PartnerID);
  obMap.put(new Integer(1),PartnerID);
  obMap.put(new Integer(2),numwidgets);
  return obMap;
  }
  </code></pre>
  
  <p>I put the above code in a function. I am calling that function from Javascript and returning values to Javascript.</p>
  
  <p>Here is my Javascript code.</p>
  
  <pre><code>JSClientService.getNoOfWidgetsFromUsername(username, {
  callback : function(data) {
  //here i want to print hashmap values.
  }
  });
  </code></pre>
  
  <p>How can I access the data on the Javascript side?</p>