Get Even More Visitors To Your Blog, Upgrade To A Business Listing >>

SOLVED: I have two lists of map

research.assistant25:


for(String circle:a4)
{
Map mapgraphCircle=new HashMap();
mapgraphCircle.put("id",circle.toLowerCase());
mapgraphCircle.put("label",circle);
System.out.println("mapgraphCircle is "+mapgraphCircle);
listgraphCircle.add(mapgraphCircle);
System.out.println("listgraphCircle is "+listgraphCircle);
}

for(Integer ols:al)
{ Map mapgraphCircle=new HashMap();
System.out.println("ols is "+ols);
mapgraphCircle.put("level",ols);
listgraphCircle1.add(mapgraphCircle);
System.out.println("listgraphCircle1 is "+listgraphCircle1);
}

jsonCartList = gson1.toJson(listgraphCircle1);
JSONArray jsonArrayCircle = new JSONArray(jsonCartList);
System.out.println("jsonArrayCircle is: " + jsonArrayCircle);
session.setAttribute("JSONnewCircle", jsonArrayCircle);

first list output is listgraphCircle is [{id=bacillus, label=Bacillus}, {id=candida, label=Candida}, {id=dorhea, label=Dorhea}, {id=pichia, label=Pichia}, {id=porphyromonas, label=Porphyromonas}]

another list output is [{level=2}, {level=1}, {level=2}, {level=1}]



Posted in S.E.F
via StackOverflow & StackExchange Atomic Web Robots
This Question have been answered
HERE


This post first appeared on Stack Solved, please read the originial post: here

Share the post

SOLVED: I have two lists of map

×

Subscribe to Stack Solved

Get updates delivered right to your inbox!

Thank you for your subscription

×