summaryrefslogtreecommitdiff
path: root/funcs
diff options
context:
space:
mode:
authorDave Henderson <dhenderson@gmail.com>2019-04-06 23:42:39 -0400
committerDave Henderson <dhenderson@gmail.com>2019-04-09 20:13:50 -0400
commit51ea3780766b1d3dacf0b2c87703d3b95d95aa38 (patch)
tree7009dbdf062b8f3fc23cf6a119224c1e3d801b5d /funcs
parent0863119d86f54d2e62f5dcd055086e35b5dc5865 (diff)
Adding coll.JSONPath function
Signed-off-by: Dave Henderson <dhenderson@gmail.com>
Diffstat (limited to 'funcs')
-rw-r--r--funcs/coll.go6
1 files changed, 6 insertions, 0 deletions
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)
+}