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

Method FetchValKeyOrIdx

pkg/util/json/json.go:98–98  ·  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

96 // access the given field. If it's an array, it interprets the key as an int
97 // and tries to access the given index.
98 FetchValKeyOrIdx(key string) (JSON, error)
99
100 // RemoveString implements the `-` operator for strings, returning JSON after removal,
101 // 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