Description
If you have a json document where you need to grab a few elemenets, and then output this in another json or csv, or plain text, it would be nice to be able to grab them easly in a template script,
For example the beer-source to get brand and name, you can do
from("kamelet:beer-source") .setHeader("name") .jq(".name") .setHeader("brand") .jq(".brand") .log("${header.brand} - ${header.name}");
But would be nice to do something ala:
.setBody().template("jq", "Brand of beer: .jq.brand and the name is .jq.name")
Attachments
Issue Links
- is related to
-
CAMEL-20154 camel-jsonpath - Make it easier to grab elements in a template like fashion
- Resolved
- relates to
-
CAMEL-20150 camel-jq - Optimize to load functions once and use child scopes per exchange
- Resolved
- links to