0
0
mirror of https://github.com/thegeeklab/wp-s3-action.git synced 2024-11-12 17:30:39 +00:00
wp-s3-action/vendor/github.com/jmespath/go-jmespath/api.go
2016-02-08 20:23:11 -08:00

13 lines
334 B
Go

package jmespath
// Search evaluates a JMESPath expression against input data and returns the result.
func Search(expression string, data interface{}) (interface{}, error) {
intr := newInterpreter()
parser := NewParser()
ast, err := parser.Parse(expression)
if err != nil {
return nil, err
}
return intr.Execute(ast, data)
}