thedevsaddam / gojsonq

A simple Go package for querying over JSON, YAML, XML, and CSV data.
https://github.com/thedevsaddam/gojsonq/wiki
MIT License
2.19k stars 140 forks source link

result is []interface #84

Open huanBird opened 3 years ago

huanBird commented 3 years ago

this jsonStr ="{"uid":17766,"openid":"ni8vhveqn6","appOpenId":"nq46kiae15","unionId":"i2jki7ttm2","nickName":"","avatarUrl":"","gender":"0","cpc":"","wxappShareImg":"","inviteCode":"","tel":"","loginTime":1603268944,"status":0,"loginIP":"","platform":"","channel":"","versionCode":"","loginType":1,"CreatedAt":"2020-10-21T16:29:05+08:00","UpdatedAt":"2020-10-21T16:29:05+08:00"}"`

i want get uid and openid ,why my get is 【】interface

userJsonq := gojsonq.New().FromString(strJson) userRes := userJsonq.Select("uid","openid").Get()

cryptomatictrader commented 2 years ago

I have the same issue. Using "ONLY" also gets me the same empty result.