Closed steinfletcher closed 5 years ago
Hi, thanks.
Yes there isn't a length function. You can add one via gval.Function
but this would be outside the jsonpath like length($.items)
.
Is that a solution for you?
Thanks for the quick reply. Yes that sounds good. How does one define a gval.Function
, I am not sure how that works?
You can use this example https://godoc.org/github.com/PaesslerAG/gval#example-Language with Function instead of PostfixOperator. You can use any function signature.
Hi, thanks for this great library.
I was hoping to do something like this.
$.items.length
or$.items.length()
. I get the following errors.could not select value, invalid key: expected number but got length (string)
Is there another way to get the length?
Thanks