[ https://issues.apache.org/jira/browse/CAMEL-18768?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Claus Ibsen reassigned CAMEL-18768: ----------------------------------- Assignee: Claus Ibsen > camel-jq - Make it easier to grab elements in a template like fashion > --------------------------------------------------------------------- > > Key: CAMEL-18768 > URL: https://issues.apache.org/jira/browse/CAMEL-18768 > Project: Camel > Issue Type: Improvement > Components: camel-jq > Reporter: Claus Ibsen > Assignee: Claus Ibsen > Priority: Major > Fix For: 4.x > > > 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 > {code} > from("kamelet:beer-source") > .setHeader("name") > .jq(".name") > .setHeader("brand") > .jq(".brand") > .log("${header.brand} - ${header.name}"); > {code} > But would be nice to do something ala: > .setBody().template("jq", "Brand of beer: .jq.brand and the name is .jq.name") -- This message was sent by Atlassian Jira (v8.20.10#820010)