aboutsummaryrefslogtreecommitdiff
path: root/query.go
diff options
context:
space:
mode:
Diffstat (limited to 'query.go')
-rw-r--r--query.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/query.go b/query.go
index 69b778c..18fcfce 100644
--- a/query.go
+++ b/query.go
@@ -13,7 +13,7 @@ func Query(parent Node, path []string) (Node, error) {
head, rest := path[0], path[1:]
switch parent := parent.(type) {
case ObjectNode:
- next, ok := parent.GetByKey(head)
+ next, ok := parent.Get(head)
if !ok {
return nil, fmt.Errorf("key %s not found at object %v", head, parent)
}