MCPcopy
hub / github.com/bitly/go-simplejson / GetPath

Method GetPath

simplejson.go:134–140  ·  view source on GitHub ↗

GetPath searches for the item as specified by the branch without the need to deep dive using Get()'s. js.GetPath("top_level", "dict")

(branch ...string)

Source from the content-addressed store, hash-verified

132//
133// js.GetPath("top_level", "dict")
134func (j *Json) GetPath(branch ...string) *Json {
135 jin := j
136 for _, p := range branch {
137 jin = jin.Get(p)
138 }
139 return jin
140}
141
142// GetIndex returns a pointer to a new `Json` object
143// for `index` in its `array` representation

Callers 7

TestSimplejsonFunction · 0.95
TestSetFunction · 0.95
TestReplaceFunction · 0.95
TestSetPathFunction · 0.95
TestSetPathNoPathFunction · 0.95

Calls 1

GetMethod · 0.80

Tested by 7

TestSimplejsonFunction · 0.76
TestSetFunction · 0.76
TestReplaceFunction · 0.76
TestSetPathFunction · 0.76
TestSetPathNoPathFunction · 0.76