Hi,
I don't see the way to iterate over keys at root level,
in this example there is one key at root level it is "object"
jsonParsed, err := gabs.ParseJSON([]byte(`{"object":{"first":1,"second":2,"third":3}}`))
if err != nil {
panic(err)
}
// S is shorthand for Search
for key, child := range jsonParsed.S("object").ChildrenMap() {
fmt.Printf("key: %v, value: %v\n", key, child.Data().(float64))
}
How can we iterate those keys ? I tried jsonParsed.S("") it does not work
Thank you
Hi,
I don't see the way to iterate over keys at root level,
in this example there is one key at root level it is "object"
How can we iterate those keys ? I tried
jsonParsed.S("")it does not workThank you