diff --git a/selcukes-databind/src/main/java/io/github/selcukes/databind/utils/JsonQuery.java b/selcukes-databind/src/main/java/io/github/selcukes/databind/utils/JsonQuery.java index 02046ca3..1ad22151 100644 --- a/selcukes-databind/src/main/java/io/github/selcukes/databind/utils/JsonQuery.java +++ b/selcukes-databind/src/main/java/io/github/selcukes/databind/utils/JsonQuery.java @@ -113,10 +113,10 @@ public List getList(String path) { */ private List extractValuesFromArray(JsonNode currentNode, String[] keys, String key, List values) { String arrayKey = extractArrayKey(key); - currentNode = currentNode.path(arrayKey); + var resultNode = currentNode.path(arrayKey); - if (currentNode.isArray()) { - for (JsonNode node : currentNode) { + if (resultNode.isArray()) { + for (JsonNode node : resultNode) { processArrayElement(keys, arrayKey, node, values); } }