How to get a map from Value type
seanlook opened this issue · comments
xiaog commented
I can't find any API that convert Value
to a map, just like gson does:
m, ok := gjson.Parse(json).Value().(map[string]interface{})
Aliaksandr Valialkin commented
There is no such API. Use Object.Visit for iterating over all the items in the object or Object.Get for obtaining value by key.
xiaog commented
Ok, I'll try it. Thanks.