Details
-
Type:
Improvement
-
Status: Resolved
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: None
-
Fix Version/s: 2.18.0
-
Component/s: camel-jsonpath
-
Labels:None
-
Estimated Complexity:Unknown
Description
We can roll our own predicates in jsonpath where you can use ? as the placeholder. The trick would be to either inline the functions in the string, and then do our own pre-parsing to replace those predicates to ?, eg
"$.person[?(@.role=='${headers.role}')]"
gets pre-parsed as
"$.person[?(@.role=='?')]"
And then we know that ${headers.role} is the simple funktion to execute as the predicate.