MCPcopy Create free account
hub / github.com/cockroachdb/cockroachdb-parser / FetchValKeyOrIdx

Method FetchValKeyOrIdx

pkg/util/json/json.go:159–159  ·  view source on GitHub ↗

FetchValKeyOrIdx is used for path access, if obj is an object, it tries to access the given field. If it's an array, it interprets the key as an int and tries to access the given index.

(key string)

Source from the content-addressed store, hash-verified

157 // access the given field. If it's an array, it interprets the key as an int
158 // and tries to access the given index.
159 FetchValKeyOrIdx(key string) (JSON, error)
160
161 // RemoveString implements the `-` operator for strings, returning JSON after removal,
162 // whether removal is valid and error message.

Callers 3

FetchPathFunction · 0.65
deepSetFunction · 0.65
deepInsertFunction · 0.65

Implementers 4

jsonNullpkg/util/json/json.go
jsonFalsepkg/util/json/json.go
jsonTruepkg/util/json/json.go
jsonEncodedpkg/util/json/encoded.go

Calls

no outgoing calls

Tested by

no test coverage detected