From 51ea3780766b1d3dacf0b2c87703d3b95d95aa38 Mon Sep 17 00:00:00 2001 From: Dave Henderson Date: Sat, 6 Apr 2019 23:42:39 -0400 Subject: Adding coll.JSONPath function Signed-off-by: Dave Henderson --- funcs/coll.go | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'funcs') diff --git a/funcs/coll.go b/funcs/coll.go index 116108be..26d2ed05 100644 --- a/funcs/coll.go +++ b/funcs/coll.go @@ -35,6 +35,7 @@ func AddCollFuncs(f map[string]interface{}) { f["reverse"] = CollNS().Reverse f["merge"] = CollNS().Merge f["sort"] = CollNS().Sort + f["jsonpath"] = CollNS().JSONPath } // CollFuncs - @@ -108,3 +109,8 @@ func (f *CollFuncs) Sort(args ...interface{}) ([]interface{}, error) { } return coll.Sort(key, list) } + +// JSONPath - +func (f *CollFuncs) JSONPath(p string, in interface{}) (interface{}, error) { + return coll.JSONPath(p, in) +} -- cgit v1.2.3