diff --git a/src/main/java/com/kodedu/other/JsonHelper.java b/src/main/java/com/kodedu/other/JsonHelper.java index 4d5d3131..923dc7b7 100644 --- a/src/main/java/com/kodedu/other/JsonHelper.java +++ b/src/main/java/com/kodedu/other/JsonHelper.java @@ -7,7 +7,7 @@ public class JsonHelper { public static JsonArray getJsonArrayOrEmpty(JsonObject jsonObject, String key) { - if (jsonObject.containsKey(key) && jsonObject.getValueType() == JsonValue.ValueType.ARRAY) { + if (jsonObject.containsKey(key) && jsonObject.get(key).getValueType() == JsonValue.ValueType.ARRAY) { return jsonObject.getJsonArray(key); } return JsonValue.EMPTY_JSON_ARRAY;