tidwall / gjson

Get JSON values quickly - JSON parser for Go
MIT License
14.29k stars 851 forks source link

How to parse a json array? #191

Open cngobd opened 3 years ago

cngobd commented 3 years ago

How to use gjson.Get().Array to parse an array which do not have a key? Json like this: [ { "name": "zhangsan", "age": "10", "phone": "11111", "email": "11111@11.com" }, { "name": "lisi", "age": "20", "phone": "22222", "email": "22222@22.com" }, ]

thank you ...

tidwall commented 3 years ago

try gjson.Parse(myArray)