How would you extract the data as follows:
I want to extract from this arraylist:
[{itemname=Original, number=12}, {itemname=BBQ, number=23}, {itemname=C
Thanks for the tip - I have changed to the following code:
ArrayList> list = new ArrayList>();
Gson gson = new Gson();
for (int i = 0; i<7;i++) {
HashMap map = new HashMap();
map.put("itemname",chips[i]);
map.put("number",chipentry[i]);
list.add(map);
System.out.println(gson.toJson(map));
}
And the result is http://imgur.com/E7uds.png
I imported com.google.gson.Gson, is there something else I'm missing? Please excuse my newbness and thanks for the help!