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

Method Exists

gjson.go:658–660  ·  view source on GitHub ↗

Exists returns true if value exists. if gjson.Get(json, "name.last").Exists(){ println("value exists") }

()

Source from the content-addressed store, hash-verified

656// println("value exists")
657// }
658func (t Result) Exists() bool {
659 return t.Type != Null || len(t.Raw) != 0
660}
661
662// Value returns one of these types:
663//

Callers 15

ForEachMethod · 0.95
ParseFunction · 0.95
parseArrayFunction · 0.95
ForEachLineFunction · 0.95
GetFunction · 0.95
TestParseAnyFunction · 0.80
TestBasic1Function · 0.80
TestBasic4Function · 0.80
TestQueriesFunction · 0.80
TestValidFunction · 0.80
queryMatchesFunction · 0.80
execModifierFunction · 0.80

Calls

no outgoing calls

Tested by 5

TestParseAnyFunction · 0.64
TestBasic1Function · 0.64
TestBasic4Function · 0.64
TestQueriesFunction · 0.64
TestValidFunction · 0.64