<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>question NiFi JoltTransformJSON - Several Changes in Support Questions</title>
    <link>https://community.cloudera.com/t5/Support-Questions/NiFi-JoltTransformJSON-Several-Changes/m-p/310431#M224152</link>
    <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I am working with the JoltTransformJSON processor, which I consider to be very powerful but complicated to use and there is not much documentation about it.&lt;/P&gt;&lt;P&gt;I have the following input JSON:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;{
   "logTypeCode":"FIN",
   "eventNumber":"1",
   "eventTime":1568066703172,
   "eventInfo":{
      "eventId":"CREATE_DOMESTIC_STANDING_ORDER",
      "eventVersion":"1"
   },
   "operationInfo":{
      "operationId":"DOMESTIC_STANDING_ORDER"
   }
}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;And my output JSON I need it to be the following:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;{
   "body":{
      "logTypeCode":"END_OF_TESTING",
      "eventNumber":"1",
      "eventTime":1568066703172,
      "eventInfo":{
         "eventId":"CREATE_DOMESTIC_STANDING_ORDER",
         "eventVersion":"1"
      },
      "operationInfo":{
         "operationId":"DOMESTIC_STANDING_ORDER"
      }
   },
   "header":{
      "date":"${dateInPropertiesFlow}"
   },
   "customValue":{
      "logTypeCode":"END_OF_TESTING",
      "ENV":"${anotherPropertie}"
   }
}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;basically, I want to group everything that comes to me inside the "body" field, then I need to create another field that is called "header", which contains a single field called "date" with the value of a property that comes to me by the flow, and finally I need a field that is called "customValue", where the value "logTypeCode" has to have the same value as the field that is in "body.logTypeCode".&lt;/P&gt;&lt;P&gt;I'm trying several ways in the application &lt;A href="https://jolt-demo.appspot.com/#inception" target="_self"&gt;https://jolt-demo.appspot.com/#inception&lt;/A&gt; but I can't get it to work as I want, for now this is the closest I got....&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;[
  {
    "operation": "shift",
    "spec": {
      "*": "body.&amp;amp;"
    }
   },
  {
    "operation": "default",
    "spec": {
      "header": {
        "date": "${paramDate}"
      }
    }
  }
]&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I've been doing a lot of tests, but I can't get the result I need... Help!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;</description>
    <pubDate>Tue, 26 Jan 2021 12:48:20 GMT</pubDate>
    <dc:creator>calonsca</dc:creator>
    <dc:date>2021-01-26T12:48:20Z</dc:date>
  </channel>
</rss>

