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

Function GetMany

gjson.go:2454–2460  ·  view source on GitHub ↗

GetMany searches json for the multiple paths. The return value is a Result array where the number of items will be equal to the number of input paths.

(json string, path ...string)

Source from the content-addressed store, hash-verified

2452// The return value is a Result array where the number of items
2453// will be equal to the number of input paths.
2454func GetMany(json string, path ...string) []Result {
2455 res := make([]Result, len(path))
2456 for i, path := range path {
2457 res[i] = Get(json, path)
2458 }
2459 return res
2460}
2461
2462// GetManyBytes searches json for the multiple paths.
2463// The return value is a Result array where the number of items

Callers 8

TestManyRecursionFunction · 0.85
testManyAnyFunction · 0.85
TestRandomManyFunction · 0.85
TestGetMany47Function · 0.85
TestGetMany48Function · 0.85
TestIssue54Function · 0.85
TestIssue55Function · 0.85

Calls 1

GetFunction · 0.85

Tested by 8

TestManyRecursionFunction · 0.68
testManyAnyFunction · 0.68
TestRandomManyFunction · 0.68
TestGetMany47Function · 0.68
TestGetMany48Function · 0.68
TestIssue54Function · 0.68
TestIssue55Function · 0.68

Used in the wild real call sites across dependent graphs

searching dependent graphs…