i tried already, this is also throwing error, i tried with '1' also
Caused by: org.apache.camel.ExpressionIllegalSyntaxException: Illegal
syntax: $..books.length() > '1'
at
org.apache.camel.jsonpath.JsonPathExpression.init(JsonPathExpression.java:185)
Hi,
you're mixing up simple amd jsonpath which is not a function within simple.
Your when statement can be written as .when().jsonpath("$..books.length() == 1")
Take a look at the sample here
https://camel.apache.org/components/latest/jsonpath-language.html
BR
Maruan
> I am parsing an json