<?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 Apache NiFi need to add square brackets around a specific JSON object in Support Questions</title>
    <link>https://community.cloudera.com/t5/Support-Questions/Apache-NiFi-need-to-add-square-brackets-around-a-specific/m-p/392790#M248246</link>
    <description>&lt;P&gt;I'm new to NiFi, and I've been struggling with wrapping square brackets around a specific JSON object. Below is my JSON input, my desired JSON output and my attempted JoltTransformJSON shift operation spec. I'm really close, but I'm getting a duplicate of the "financialSystemFields" object.&lt;BR /&gt;&lt;BR /&gt;Please advise, and many thanks in advance.&lt;BR /&gt;&lt;BR /&gt;JSON Input:&lt;BR /&gt;[{&lt;BR /&gt;"type" : "APPROPRIATION",&lt;BR /&gt;"subType" : "ADMINISTRATIVE",&lt;BR /&gt;&amp;nbsp;"duration" : "1",&lt;BR /&gt;"retiredDate" : null,&lt;BR /&gt;"expiredDate" : "2023-09-30 00:00:00.0",&lt;BR /&gt;"closedDate" : "2028-09-30 00:00:00.0",&lt;BR /&gt;"association" : null,&lt;BR /&gt;"financialSystemFields" : {&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; "FundId" : "01234NFWJ",&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; "fundedProgram" : null,&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; "projectDescription" : "NO FUN WITH JOLT"&lt;BR /&gt;&amp;nbsp; &amp;nbsp;}&lt;BR /&gt;}]&lt;BR /&gt;&lt;BR /&gt;Current JSON Output:&lt;BR /&gt;[{&lt;BR /&gt;"type": "APPROPRIATION",&lt;BR /&gt;"subType": "ADMINISTRATIVE",&lt;BR /&gt;"duration": "1",&lt;BR /&gt;"retiredDate": null,&lt;BR /&gt;"expiredDate": "2023-09-30 00:00:00.0",&lt;BR /&gt;"closedDate": "2028-09-30 00:00:00.0",&lt;BR /&gt;"association": null,&lt;BR /&gt;"financialSystemFields": &lt;STRONG&gt;[&lt;/STRONG&gt;{&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; "FundId": "01234NFWJ",&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; "fundedProgram": null,&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; "projectDescription": "NO FUN WITH JOLT"&lt;BR /&gt;&amp;nbsp; &amp;nbsp;}, {&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; "FundId": "01234NFWJ",&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; "fundedProgram": null,&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; "projectDescription": "NO FUN WITH JOLT"&lt;BR /&gt;&amp;nbsp; &amp;nbsp;}&lt;STRONG&gt;]&lt;/STRONG&gt;&lt;BR /&gt;}]&lt;BR /&gt;&lt;BR /&gt;Desired JSON Output:&lt;BR /&gt;[{&lt;BR /&gt;"type": "APPROPRIATION",&lt;BR /&gt;"subType": "ADMINISTRATIVE",&lt;BR /&gt;"duration": "1",&lt;BR /&gt;"retiredDate": null,&lt;BR /&gt;"expiredDate": "2023-09-30 00:00:00.0",&lt;BR /&gt;"closedDate": "2028-09-30 00:00:00.0",&lt;BR /&gt;"association": null,&lt;BR /&gt;"financialSystemFields": &lt;STRONG&gt;[&lt;/STRONG&gt;{&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; "FundId": "01234NFWJ",&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; "fundedProgram": null,&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; "projectDescription": "NO FUN WITH JOLT"&lt;BR /&gt;&amp;nbsp; }&lt;STRONG&gt;]&lt;/STRONG&gt;&lt;BR /&gt;}]&lt;BR /&gt;&lt;BR /&gt;Jolt Operation:&lt;BR /&gt;[{&lt;BR /&gt;&amp;nbsp; "operation": "shift",&lt;BR /&gt;&amp;nbsp; "spec": {&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;"*": {&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;"@": "[&amp;amp;1]",&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;"@(0,financialSystemFields)": "[&amp;amp;].financialSystemFields"&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;BR /&gt;&amp;nbsp; &amp;nbsp;}&lt;BR /&gt;}]&lt;/P&gt;</description>
    <pubDate>Thu, 29 Aug 2024 16:58:33 GMT</pubDate>
    <dc:creator>JoltInfan</dc:creator>
    <dc:date>2024-08-29T16:58:33Z</dc:date>
    <item>
      <title>Apache NiFi need to add square brackets around a specific JSON object</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Apache-NiFi-need-to-add-square-brackets-around-a-specific/m-p/392790#M248246</link>
      <description>&lt;P&gt;I'm new to NiFi, and I've been struggling with wrapping square brackets around a specific JSON object. Below is my JSON input, my desired JSON output and my attempted JoltTransformJSON shift operation spec. I'm really close, but I'm getting a duplicate of the "financialSystemFields" object.&lt;BR /&gt;&lt;BR /&gt;Please advise, and many thanks in advance.&lt;BR /&gt;&lt;BR /&gt;JSON Input:&lt;BR /&gt;[{&lt;BR /&gt;"type" : "APPROPRIATION",&lt;BR /&gt;"subType" : "ADMINISTRATIVE",&lt;BR /&gt;&amp;nbsp;"duration" : "1",&lt;BR /&gt;"retiredDate" : null,&lt;BR /&gt;"expiredDate" : "2023-09-30 00:00:00.0",&lt;BR /&gt;"closedDate" : "2028-09-30 00:00:00.0",&lt;BR /&gt;"association" : null,&lt;BR /&gt;"financialSystemFields" : {&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; "FundId" : "01234NFWJ",&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; "fundedProgram" : null,&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; "projectDescription" : "NO FUN WITH JOLT"&lt;BR /&gt;&amp;nbsp; &amp;nbsp;}&lt;BR /&gt;}]&lt;BR /&gt;&lt;BR /&gt;Current JSON Output:&lt;BR /&gt;[{&lt;BR /&gt;"type": "APPROPRIATION",&lt;BR /&gt;"subType": "ADMINISTRATIVE",&lt;BR /&gt;"duration": "1",&lt;BR /&gt;"retiredDate": null,&lt;BR /&gt;"expiredDate": "2023-09-30 00:00:00.0",&lt;BR /&gt;"closedDate": "2028-09-30 00:00:00.0",&lt;BR /&gt;"association": null,&lt;BR /&gt;"financialSystemFields": &lt;STRONG&gt;[&lt;/STRONG&gt;{&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; "FundId": "01234NFWJ",&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; "fundedProgram": null,&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; "projectDescription": "NO FUN WITH JOLT"&lt;BR /&gt;&amp;nbsp; &amp;nbsp;}, {&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; "FundId": "01234NFWJ",&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; "fundedProgram": null,&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; "projectDescription": "NO FUN WITH JOLT"&lt;BR /&gt;&amp;nbsp; &amp;nbsp;}&lt;STRONG&gt;]&lt;/STRONG&gt;&lt;BR /&gt;}]&lt;BR /&gt;&lt;BR /&gt;Desired JSON Output:&lt;BR /&gt;[{&lt;BR /&gt;"type": "APPROPRIATION",&lt;BR /&gt;"subType": "ADMINISTRATIVE",&lt;BR /&gt;"duration": "1",&lt;BR /&gt;"retiredDate": null,&lt;BR /&gt;"expiredDate": "2023-09-30 00:00:00.0",&lt;BR /&gt;"closedDate": "2028-09-30 00:00:00.0",&lt;BR /&gt;"association": null,&lt;BR /&gt;"financialSystemFields": &lt;STRONG&gt;[&lt;/STRONG&gt;{&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; "FundId": "01234NFWJ",&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; "fundedProgram": null,&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; "projectDescription": "NO FUN WITH JOLT"&lt;BR /&gt;&amp;nbsp; }&lt;STRONG&gt;]&lt;/STRONG&gt;&lt;BR /&gt;}]&lt;BR /&gt;&lt;BR /&gt;Jolt Operation:&lt;BR /&gt;[{&lt;BR /&gt;&amp;nbsp; "operation": "shift",&lt;BR /&gt;&amp;nbsp; "spec": {&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;"*": {&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;"@": "[&amp;amp;1]",&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;"@(0,financialSystemFields)": "[&amp;amp;].financialSystemFields"&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;BR /&gt;&amp;nbsp; &amp;nbsp;}&lt;BR /&gt;}]&lt;/P&gt;</description>
      <pubDate>Thu, 29 Aug 2024 16:58:33 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Apache-NiFi-need-to-add-square-brackets-around-a-specific/m-p/392790#M248246</guid>
      <dc:creator>JoltInfan</dc:creator>
      <dc:date>2024-08-29T16:58:33Z</dc:date>
    </item>
    <item>
      <title>Re: Apache NiFi need to add square brackets around a specific JSON object</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Apache-NiFi-need-to-add-square-brackets-around-a-specific/m-p/392803#M248252</link>
      <description>&lt;P&gt;&lt;a href="https://community.cloudera.com/t5/user/viewprofilepage/user-id/115358"&gt;@JoltInfan&lt;/a&gt;&amp;nbsp;Welcome to the Cloudera Community!&lt;BR /&gt;&lt;BR /&gt;To help you get the best possible solution, I have tagged our NiFi experts &lt;a href="https://community.cloudera.com/t5/user/viewprofilepage/user-id/35454"&gt;@MattWho&lt;/a&gt;&amp;nbsp;&lt;a href="https://community.cloudera.com/t5/user/viewprofilepage/user-id/29989"&gt;@vaishaakb&lt;/a&gt;&amp;nbsp;who may be able to assist you further.&lt;BR /&gt;&lt;BR /&gt;Please keep us updated on your post, and we hope you find a satisfactory solution to your query.&lt;/P&gt;</description>
      <pubDate>Thu, 29 Aug 2024 17:31:15 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Apache-NiFi-need-to-add-square-brackets-around-a-specific/m-p/392803#M248252</guid>
      <dc:creator>DianaTorres</dc:creator>
      <dc:date>2024-08-29T17:31:15Z</dc:date>
    </item>
    <item>
      <title>Re: Apache NiFi need to add square brackets around a specific JSON object</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Apache-NiFi-need-to-add-square-brackets-around-a-specific/m-p/392818#M248260</link>
      <description>&lt;P&gt;I've figured out what needs to be done. The following fixed the issue.&lt;BR /&gt;&lt;BR /&gt;[{&lt;BR /&gt;"operation": "cardinality",&lt;BR /&gt;"spec": {&lt;BR /&gt;"financialSystemFields": "MANY"&lt;BR /&gt;}&lt;BR /&gt;}]&lt;/P&gt;</description>
      <pubDate>Thu, 29 Aug 2024 19:25:59 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Apache-NiFi-need-to-add-square-brackets-around-a-specific/m-p/392818#M248260</guid>
      <dc:creator>JoltInfan</dc:creator>
      <dc:date>2024-08-29T19:25:59Z</dc:date>
    </item>
  </channel>
</rss>

