java - How to add HashMap values into an ArrayList -
i have hashmap , iterating this:
for(hashmap<string, integer> astring : value){ system.out.println("key : " + key + " value : " + astring); }
i result as:
key : name value : {ski=7, cor=13, in=30}
now need separate `ski , cor , in 3 different arraylists corresponding values? how that?
if info json, can decode using json:
arraylist<integer> array = new arraylist<integer>(); jsonarray json = new jsonarray(astring); (int =0; i< json.length(); i++) { array.add(json.getint(i)); }
java arraylist hashmap
No comments:
Post a Comment