Answers for "iterate through getAsJsonObject().entrySet()"

0

iterate through getAsJsonObject().entrySet()

JsonObject object;
ArrayList<Integer> codes = new ArrayList<Integer>();
for (Map.Entry<String,JsonElement> entry : object.entrySet()) {
    JsonArray array = entry.getValue().getAsJsonObject().getAsJsonArray("unterfeld");
    for (JsonElement codeHolder : array) {
        codes.add(codeHolder.getAsJsonObject().getAsJsonPrimitive("code").getAsInt());
    }
}
Posted by: Guest on June-13-2020

Code answers related to "Javascript"

Browse Popular Code Answers by Language