Код: Выделить всё
Set entries = rootJsonElement.getAsJsonObject().entrySet();
for (Map.Entry entry : entries) {
if (entry.getKey().contains("-fragment")) {
// apply function that gets fragment data and adds
// jsonobject
}
}
Подробнее здесь: https://stackoverflow.com/questions/722 ... map-java-8