<?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 Json Jolt to Remove All Nulls from Json in Support Questions</title>
    <link>https://community.cloudera.com/t5/Support-Questions/Json-Jolt-to-Remove-All-Nulls-from-Json/m-p/336008#M232095</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have the following Json. I would like to create a Jolt Spec to remove all nulls from all levels. How can I do that? Any help would be appreciated. Thanks&lt;/P&gt;
&lt;P&gt;&lt;FONT size="1 2 3 4 5 6 7"&gt;{&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="1 2 3 4 5 6 7"&gt;"ID": "c22b657e-227b-4c65-e6f8-08d88a3e1118",&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="1 2 3 4 5 6 7"&gt;"Name": "SomeName",&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="1 2 3 4 5 6 7"&gt;"TaggedItemName": "SomeValue",&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="1 2 3 4 5 6 7"&gt;"ITRName": "SomeValue",&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="1 2 3 4 5 6 7"&gt;"TestReference": null,&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="1 2 3 4 5 6 7"&gt;"JobCardName": null,&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="1 2 3 4 5 6 7"&gt;"Comments": "test",&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="1 2 3 4 5 6 7"&gt;"PrimaryHandoverName": null,&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="1 2 3 4 5 6 7"&gt;"SecondaryHandoverNumber": null,&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="1 2 3 4 5 6 7"&gt;"CertificationGroupingName": null,&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="1 2 3 4 5 6 7"&gt;"DocumentCode": "SomeValue",&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="1 2 3 4 5 6 7"&gt;"AssignedToName": "SomeName",&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="1 2 3 4 5 6 7"&gt;"DocumentReference": null,&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="1 2 3 4 5 6 7"&gt;"TagITRCompletionStatusName": "Rejected",&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="1 2 3 4 5 6 7"&gt;"ScheduleRevision": null,&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="1 2 3 4 5 6 7"&gt;"Completed": {&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="1 2 3 4 5 6 7"&gt;"SignOff_AuthP": "John",&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="1 2 3 4 5 6 7"&gt;"SignOff_Date": null&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="1 2 3 4 5 6 7"&gt;},&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="1 2 3 4 5 6 7"&gt;"Accepted": {&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="1 2 3 4 5 6 7"&gt;"SignOff_AuthP": "Smith",&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="1 2 3 4 5 6 7"&gt;"SignOff_Date": null&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="1 2 3 4 5 6 7"&gt;},&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="1 2 3 4 5 6 7"&gt;"Approved": {&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="1 2 3 4 5 6 7"&gt;"SignOff_AuthP": "Ali",&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="1 2 3 4 5 6 7"&gt;"SignOff_Date": null&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="1 2 3 4 5 6 7"&gt;},&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="1 2 3 4 5 6 7"&gt;"ScheduleGroup": null,&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="1 2 3 4 5 6 7"&gt;"DownloadUri": "SomeUrl",&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="1 2 3 4 5 6 7"&gt;"UpdatedDate": "2022-01-18T11:36:33.9057626Z",&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="1 2 3 4 5 6 7"&gt;"CreatedDate": "2020-11-30T10:57:20.8534287Z"&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="1 2 3 4 5 6 7"&gt;}&lt;/FONT&gt;&lt;/P&gt;</description>
    <pubDate>Thu, 10 Feb 2022 18:24:15 GMT</pubDate>
    <dc:creator>SAMSAL</dc:creator>
    <dc:date>2022-02-10T18:24:15Z</dc:date>
    <item>
      <title>Json Jolt to Remove All Nulls from Json</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Json-Jolt-to-Remove-All-Nulls-from-Json/m-p/336008#M232095</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have the following Json. I would like to create a Jolt Spec to remove all nulls from all levels. How can I do that? Any help would be appreciated. Thanks&lt;/P&gt;
&lt;P&gt;&lt;FONT size="1 2 3 4 5 6 7"&gt;{&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="1 2 3 4 5 6 7"&gt;"ID": "c22b657e-227b-4c65-e6f8-08d88a3e1118",&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="1 2 3 4 5 6 7"&gt;"Name": "SomeName",&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="1 2 3 4 5 6 7"&gt;"TaggedItemName": "SomeValue",&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="1 2 3 4 5 6 7"&gt;"ITRName": "SomeValue",&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="1 2 3 4 5 6 7"&gt;"TestReference": null,&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="1 2 3 4 5 6 7"&gt;"JobCardName": null,&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="1 2 3 4 5 6 7"&gt;"Comments": "test",&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="1 2 3 4 5 6 7"&gt;"PrimaryHandoverName": null,&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="1 2 3 4 5 6 7"&gt;"SecondaryHandoverNumber": null,&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="1 2 3 4 5 6 7"&gt;"CertificationGroupingName": null,&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="1 2 3 4 5 6 7"&gt;"DocumentCode": "SomeValue",&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="1 2 3 4 5 6 7"&gt;"AssignedToName": "SomeName",&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="1 2 3 4 5 6 7"&gt;"DocumentReference": null,&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="1 2 3 4 5 6 7"&gt;"TagITRCompletionStatusName": "Rejected",&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="1 2 3 4 5 6 7"&gt;"ScheduleRevision": null,&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="1 2 3 4 5 6 7"&gt;"Completed": {&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="1 2 3 4 5 6 7"&gt;"SignOff_AuthP": "John",&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="1 2 3 4 5 6 7"&gt;"SignOff_Date": null&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="1 2 3 4 5 6 7"&gt;},&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="1 2 3 4 5 6 7"&gt;"Accepted": {&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="1 2 3 4 5 6 7"&gt;"SignOff_AuthP": "Smith",&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="1 2 3 4 5 6 7"&gt;"SignOff_Date": null&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="1 2 3 4 5 6 7"&gt;},&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="1 2 3 4 5 6 7"&gt;"Approved": {&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="1 2 3 4 5 6 7"&gt;"SignOff_AuthP": "Ali",&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="1 2 3 4 5 6 7"&gt;"SignOff_Date": null&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="1 2 3 4 5 6 7"&gt;},&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="1 2 3 4 5 6 7"&gt;"ScheduleGroup": null,&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="1 2 3 4 5 6 7"&gt;"DownloadUri": "SomeUrl",&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="1 2 3 4 5 6 7"&gt;"UpdatedDate": "2022-01-18T11:36:33.9057626Z",&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="1 2 3 4 5 6 7"&gt;"CreatedDate": "2020-11-30T10:57:20.8534287Z"&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="1 2 3 4 5 6 7"&gt;}&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 10 Feb 2022 18:24:15 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Json-Jolt-to-Remove-All-Nulls-from-Json/m-p/336008#M232095</guid>
      <dc:creator>SAMSAL</dc:creator>
      <dc:date>2022-02-10T18:24:15Z</dc:date>
    </item>
    <item>
      <title>Re: Json Jolt to Remove All Nulls from Json</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Json-Jolt-to-Remove-All-Nulls-from-Json/m-p/336029#M232106</link>
      <description>&lt;P&gt;I don't know if it's possible to do this generically and recursively using Jolt.&lt;/P&gt;&lt;P&gt;Nevertheless, if your schema is well know you can achieve want you want with something like this:&lt;/P&gt;&lt;PRE&gt;{&lt;BR /&gt;  "Completed": {&lt;BR /&gt;    "*": {&lt;BR /&gt;      "*": {&lt;BR /&gt;        "@1": "&amp;amp;3.&amp;amp;2"&lt;BR /&gt;      }&lt;BR /&gt;    }&lt;BR /&gt;  },&lt;BR /&gt;  "Accepted": {&lt;BR /&gt;    "*": {&lt;BR /&gt;      "*": {&lt;BR /&gt;        "@1": "&amp;amp;3.&amp;amp;2"&lt;BR /&gt;      }&lt;BR /&gt;    }&lt;BR /&gt;  },&lt;BR /&gt;  "Approved": {&lt;BR /&gt;    "*": {&lt;BR /&gt;      "*": {&lt;BR /&gt;        "@1": "&amp;amp;3.&amp;amp;2"&lt;BR /&gt;      }&lt;BR /&gt;    }&lt;BR /&gt;  },&lt;BR /&gt;  "*": {&lt;BR /&gt;    "*": {&lt;BR /&gt;      "@1": "&amp;amp;2"&lt;BR /&gt;    }&lt;BR /&gt;  }&lt;BR /&gt;}&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Cheers,&lt;/P&gt;&lt;P&gt;Andre&lt;/P&gt;</description>
      <pubDate>Fri, 11 Feb 2022 02:45:39 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Json-Jolt-to-Remove-All-Nulls-from-Json/m-p/336029#M232106</guid>
      <dc:creator>araujo</dc:creator>
      <dc:date>2022-02-11T02:45:39Z</dc:date>
    </item>
    <item>
      <title>Re: Json Jolt to Remove All Nulls from Json</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Json-Jolt-to-Remove-All-Nulls-from-Json/m-p/336135#M232151</link>
      <description>&lt;P&gt;Thank you so much,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;That did the trick. You seem to be a json jolt guru. Im trying to understand it myself but its not that straight forward. Can you just elaborate this syntax for me which remove null values on the base level:&lt;/P&gt;&lt;PRE&gt;"*": {&lt;BR /&gt;    "*": {&lt;BR /&gt;      "@1": "&amp;amp;2"&lt;BR /&gt;    }&lt;BR /&gt; }&lt;/PRE&gt;&lt;P&gt;Why there is two asterisks in front of it?&lt;/P&gt;</description>
      <pubDate>Fri, 11 Feb 2022 19:10:05 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Json-Jolt-to-Remove-All-Nulls-from-Json/m-p/336135#M232151</guid>
      <dc:creator>SAMSAL</dc:creator>
      <dc:date>2022-02-11T19:10:05Z</dc:date>
    </item>
    <item>
      <title>Re: Json Jolt to Remove All Nulls from Json</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Json-Jolt-to-Remove-All-Nulls-from-Json/m-p/336144#M232153</link>
      <description>&lt;P&gt;Great to hear!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I try my best to understand Jolt because sometimes it can be quite useful, but I think it has a very convoluted syntax and sometimes it's really hard to use. But practice helps.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The first asterisk matches against the field names of an object. The second asterisk depends: if the value of the attribute is a scalar, it will match against the value; if it's a nest object, it will match against the name of the nested object. The trick is that when it matches the value of the object it does not match nulls &lt;span class="lia-unicode-emoji" title=":winking_face:"&gt;😉&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Cheers,&lt;/P&gt;&lt;P&gt;André&lt;/P&gt;</description>
      <pubDate>Fri, 11 Feb 2022 21:51:23 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Json-Jolt-to-Remove-All-Nulls-from-Json/m-p/336144#M232153</guid>
      <dc:creator>araujo</dc:creator>
      <dc:date>2022-02-11T21:51:23Z</dc:date>
    </item>
  </channel>
</rss>

