Skip to content

Commit 234ab0e

Browse files
authored
Fix bug in getValueAtPath for array index expression (#113)
1 parent f35d93f commit 234ab0e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pkg/utils/utils.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,8 +118,8 @@ func getValueAtPath(obj map[string]interface{}, path string) (interface{}, error
118118
return nil, fmt.Errorf("at path position '%v' out of bounds index '%v'", processed, index)
119119
}
120120
cursor = asArray[index]
121-
remaining = remaining[end+1:]
122121
processed += remaining[0:end]
122+
remaining = remaining[end+1:]
123123
} else if strings.HasPrefix(remaining, ".") {
124124
// Field reference expression
125125
remaining = remaining[1:]

0 commit comments

Comments
 (0)