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

Function modDig

gjson.go:3598–3610  ·  view source on GitHub ↗
(json, arg string)

Source from the content-addressed store, hash-verified

3596}
3597
3598func modDig(json, arg string) string {
3599 all := parseRecursiveDescent(nil, Parse(json), arg)
3600 var out []byte
3601 out = append(out, '[')
3602 for i, res := range all {
3603 if i > 0 {
3604 out = append(out, ',')
3605 }
3606 out = append(out, res.Raw...)
3607 }
3608 out = append(out, ']')
3609 return string(out)
3610}
3611
3612// All iterates over a json result.
3613// This works identically to ForEach, but allows modern Go loops:

Callers

nothing calls this directly

Calls 2

parseRecursiveDescentFunction · 0.85
ParseFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…