diff --git a/jsurfer-core/src/main/java/org/jsfr/json/path/JsonPath.java b/jsurfer-core/src/main/java/org/jsfr/json/path/JsonPath.java index cea68ba..0b91cce 100644 --- a/jsurfer-core/src/main/java/org/jsfr/json/path/JsonPath.java +++ b/jsurfer-core/src/main/java/org/jsfr/json/path/JsonPath.java @@ -185,6 +185,8 @@ public boolean match(JsonPath jsonPath) { if (!get(pointer1).match(jsonPath.get(pointer2))) { return false; } + pointer1--; + pointer2--; while (pointer1 >= 0) { if (!(pointer2 >= 0)) { return false;