- #1
iamjon.smith
- 117
- 3
Using the following code:
mySet gets printed to the console as:
I need to iterate through the values and put them into an array. Please provide some direction as to how to iterate over this mapped entrySet and enter each value into an array.
Code:
Set<Map.Entry<String,JsonElement>> mySet = jsonObject.entrySet();
for(Map.Entry<String,JsonElement> singleItem : mySet)
{
singleItem.getKey();
System.out.println("Set values: " + mySet);
}
mySet gets printed to the console as:
Code:
Set values: [columnGridContainer="[[1,\"1\",\"Default Value\",\"Y\",\"N\",\"0\",\"Left\",\"Default Value\",\"Default Value\",\"Default Value\",\"Default Value\",\"Left\",\"Center\",\"Center\",\"Center\",\"#000056\",\"None\",\"Date/Time\",\"No Filter\",\"N\"]]", header_row_2_enabled="Y", header_row_3_enabled="Y", header_row_4_enabled="Y", col_widths_units="pixels", default_sub_rows_closed="Y", extjs_component="grid", refreshrate="181", title="everything works right", subtitle="except display for checkboxes...", autoheight="N", bottom_buttons="N", col_label_source="col_config_table"]
I need to iterate through the values and put them into an array. Please provide some direction as to how to iterate over this mapped entrySet and enter each value into an array.