Here is my code:
public Map<Object, Object> getJiras(String values) throws Exception {
{
...
Map<Object, Object> map=new HashMap<Object,Object>();
for(int i=0;i<jsonarr_1.size();i++){
JSONObject jsonobj_1 = (JSONObject)jsonarr_1.get(i);
JSONObject jsonobj_2 = (JSONObject)jsonobj_1.get("fields");
JSONObject status1 = (JSONObject)jsonobj_2.get("status");
JSONObject issuetype = (JSONObject)jsonobj_2.get("issuetype");
String var = issuetype.get("name").toString();
System.out.println("\nProject Type: "+var);
JSONObject email = (JSONObject)jsonobj_2.get("assignee");
Object obj3 = email.get("emailAddress");
System.out.println(obj3);
if((var.equals(s2)) || (var.equals(s3)))
{
Object obj1 = jsonobj_1.get("key");
Object obj2 = status1.get("name");
Object obj3 = email.get("emailAddress");
map.put(obj1, obj2);
}
}
return map;
}
Actually I need to return the obj3 to my servlet which calls this getJiras().How can I return it.Please help me with the solution.Thanks in advance.