int i;
 JSONObject j1 = new JSONObject();
 JSONObject[] jarray=new JSONObject[citylist.size()];
 JSONArray jSONArray = new JSONArray();
 for(i=0;i<citylist.size();i++)
 {
 jarray[i]=new JSONObject();
 jarray[i].put("name", citylist.get(i).city);
 jarray[i].put("value", citylist.get(i).count);
 jSONArray.add(jarray[i]);
 }
 // StringBuffer sBuffer = new StringBuffer();
 // jSONArray.stream().forEach(jsonobejct->arrayIdToString((JSONObject) jsonobejct,sBuffer));
 strvalue=jSONArray.toString();
 System.out.println(jSONArray.toString());