MCPcopy Create free account
hub / github.com/jmespath/go-jmespath / Search

Function Search

api.go:41–49  ·  view source on GitHub ↗

Search evaluates a JMESPath expression against input data and returns the result.

(expression string, data interface{})

Source from the content-addressed store, hash-verified

39
40// Search evaluates a JMESPath expression against input data and returns the result.
41func Search(expression string, data interface{}) (interface{}, error) {
42 intr := newInterpreter()
43 parser := NewParser()
44 ast, err := parser.Parse(expression)
45 if err != nil {
46 return nil, err
47 }
48 return intr.Execute(ast, data)
49}

Calls 4

ParseMethod · 0.95
newInterpreterFunction · 0.85
NewParserFunction · 0.85
ExecuteMethod · 0.80

Used in the wild real call sites across dependent graphs

searching dependent graphs…