diff --git a/retrieve.go b/retrieve.go index e1daeb8..e2fe751 100644 --- a/retrieve.go +++ b/retrieve.go @@ -21,7 +21,11 @@ func get(value reflect.Value, path string) reflect.Value { var resultSlice reflect.Value length := value.Len() - + + if length == 0 { + return resultSlice + } + for i := 0; i < length; i++ { item := value.Index(i)