stretchr / objx

Go package for dealing with maps, slices, JSON and other data.
MIT License
690 stars 75 forks source link

Issue when resolving array elements as the last element of the expression #88

Closed Echolz closed 5 years ago

Echolz commented 5 years ago

When I try to resolve, where the accessing of the element is the last operation of the expression I get the array of friends and not the element in the array of friends which is on the 0-th index.

result := m.Get("inviter.Friends[0]")

reflect.Typeof(result) //[]people.Friend (array of Friend and not a single friend)