MCPcopy
hub / github.com/tidwall/gjson / Values

Method Values

gjson.go:3644–3650  ·  view source on GitHub ↗

Values iterates over a json result. This works identically to ForEach, but allows modern Go loops: for value := range res.Values() { fmt.Printf("%s\n", value) }

()

Source from the content-addressed store, hash-verified

3642// fmt.Printf("%s\n", value)
3643// }
3644func (t Result) Values() iter.Seq[Result] {
3645 return func(yield func(Result) bool) {
3646 t.ForEach(func(_, value Result) bool {
3647 return yield(value)
3648 })
3649 }
3650}

Callers 1

TestIterFunction · 0.80

Calls 1

ForEachMethod · 0.95

Tested by 1

TestIterFunction · 0.64