<?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 Re: Removing Null Values using jolt in a nested JSON response in Support Questions</title>
    <link>https://community.cloudera.com/t5/Support-Questions/Removing-Null-Values-using-jolt-in-a-nested-JSON-response/m-p/349492#M235675</link>
    <description>&lt;P&gt;&lt;a href="https://community.cloudera.com/t5/user/viewprofilepage/user-id/99595"&gt;@AmiJhones&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I've answer a similar question before:&amp;nbsp;&lt;A href="https://community.cloudera.com/t5/Support-Questions/Json-Jolt-to-Remove-All-Nulls-from-Json/td-p/336008" target="_blank"&gt;https://community.cloudera.com/t5/Support-Questions/Json-Jolt-to-Remove-All-Nulls-from-Json/td-p/336008&lt;/A&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;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 03 Aug 2022 23:24:18 GMT</pubDate>
    <dc:creator>araujo</dc:creator>
    <dc:date>2022-08-03T23:24:18Z</dc:date>
    <item>
      <title>Removing Null Values using jolt in a nested JSON response</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Removing-Null-Values-using-jolt-in-a-nested-JSON-response/m-p/349464#M235668</link>
      <description>&lt;P&gt;Hi, I'm new to jolt and am trying to remove null values from a nested json using jolt.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Example JSON:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;{&lt;BR /&gt;"field1": {&lt;BR /&gt;"subfield1": null&lt;BR /&gt;},&lt;BR /&gt;"field2": {&lt;BR /&gt;"subfield21": "528010000072312",&lt;BR /&gt;"subfield22": null&lt;BR /&gt;},&lt;BR /&gt;"field3": {&lt;BR /&gt;"field31": null,&lt;BR /&gt;"field32": null,&lt;BR /&gt;"field33": {&lt;BR /&gt;"field331": null,&lt;BR /&gt;"field332": null&lt;BR /&gt;}&lt;BR /&gt;},&lt;BR /&gt;"field4": {&lt;BR /&gt;"field41": null,&lt;BR /&gt;"field42": "UNKNOWN",&lt;BR /&gt;"field43": "NONE",&lt;BR /&gt;"field44": {&lt;BR /&gt;"field441": {&lt;BR /&gt;"field4411": null,&lt;BR /&gt;"field4412": null&lt;BR /&gt;}&lt;BR /&gt;}&lt;BR /&gt;},&lt;BR /&gt;"field5": {&lt;BR /&gt;"field51": null,&lt;BR /&gt;"field52": {&lt;BR /&gt;"field521": null,&lt;BR /&gt;"field522": null&lt;BR /&gt;},&lt;BR /&gt;"field53": {&lt;BR /&gt;"field531": null,&lt;BR /&gt;"field532": {&lt;BR /&gt;"field5321": null&lt;BR /&gt;},&lt;BR /&gt;"field533": {&lt;BR /&gt;"field5331": "0"&lt;BR /&gt;}&lt;BR /&gt;}&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;JOLT SPEC:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;[&lt;BR /&gt;{&lt;BR /&gt;"operation": "shift",&lt;BR /&gt;"spec": {&lt;BR /&gt;"field1": {&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;"field2": {&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;"field3": {&lt;BR /&gt;"*": {&lt;BR /&gt;"*": {&lt;BR /&gt;"@1": "&amp;amp;3.&amp;amp;2"&lt;BR /&gt;},&lt;BR /&gt;"field33": {&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;"field4": {&lt;BR /&gt;"*": {&lt;BR /&gt;"*": {&lt;BR /&gt;"@1": "&amp;amp;3.&amp;amp;2"&lt;BR /&gt;},&lt;BR /&gt;"field44": {&lt;BR /&gt;"field441": {&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;"field5": {&lt;BR /&gt;"*": {&lt;BR /&gt;"*": {&lt;BR /&gt;"@1": "&amp;amp;3.&amp;amp;2"&lt;BR /&gt;},&lt;BR /&gt;"field53": {&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;"*": {&lt;BR /&gt;"*": {&lt;BR /&gt;"@1": "&amp;amp;2"&lt;BR /&gt;}&lt;BR /&gt;}&lt;BR /&gt;}&lt;BR /&gt;},&lt;BR /&gt;{&lt;BR /&gt;"operation": "modify-overwrite-beta",&lt;BR /&gt;"spec": {&lt;BR /&gt;"*": "=recursivelySquashNulls"&lt;BR /&gt;}&lt;BR /&gt;}&lt;BR /&gt;]&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;OUTPUT:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;{&lt;BR /&gt;"field2" : {&lt;BR /&gt;"subfield21" : "528010000072312"&lt;BR /&gt;},&lt;BR /&gt;"field3" : {&lt;BR /&gt;"field33" : [ { }, { } ]&lt;BR /&gt;},&lt;BR /&gt;"field4" : {&lt;BR /&gt;"field42" : "UNKNOWN",&lt;BR /&gt;"field43" : "NONE",&lt;BR /&gt;"field44" : {&lt;BR /&gt;"field441" : { }&lt;BR /&gt;}&lt;BR /&gt;},&lt;BR /&gt;"field5" : {&lt;BR /&gt;"field52" : [ { }, { } ],&lt;BR /&gt;"field53" : [ {&lt;BR /&gt;"field532" : { },&lt;BR /&gt;"field533" : {&lt;BR /&gt;"field5331" : "0"&lt;BR /&gt;}&lt;BR /&gt;}, {&lt;BR /&gt;"field532" : { },&lt;BR /&gt;"field533" : {&lt;BR /&gt;"field5331" : "0"&lt;BR /&gt;}&lt;BR /&gt;}, {&lt;BR /&gt;"field532" : { },&lt;BR /&gt;"field533" : {&lt;BR /&gt;"field5331" : "0"&lt;BR /&gt;}&lt;BR /&gt;} ]&lt;BR /&gt;}&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;EXPECTED OUTPUT:&lt;/STRONG&gt;&lt;BR /&gt;&lt;BR /&gt;{&lt;BR /&gt;"field2": {&lt;BR /&gt;"subfield21": "528010000072312"&lt;BR /&gt;},&lt;BR /&gt;"field4": {&lt;BR /&gt;"field42": "UNKNOWN",&lt;BR /&gt;"field43": "NONE"&lt;BR /&gt;},&lt;BR /&gt;"field5": {&lt;BR /&gt;"field53": {&lt;BR /&gt;"field533": {&lt;BR /&gt;"field5331": "0"&lt;BR /&gt;}&lt;BR /&gt;}&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;QUESTIONS:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;1. How can I completely remove an&amp;nbsp;empty node in json using jolt?&lt;/P&gt;&lt;P&gt;2. Why is the values for "field5" being repeated?&lt;BR /&gt;&lt;BR /&gt;Would very much appreciate help with Jolt &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 03 Aug 2022 16:07:08 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Removing-Null-Values-using-jolt-in-a-nested-JSON-response/m-p/349464#M235668</guid>
      <dc:creator>AmiJhones</dc:creator>
      <dc:date>2022-08-03T16:07:08Z</dc:date>
    </item>
    <item>
      <title>Re: Removing Null Values using jolt in a nested JSON response</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Removing-Null-Values-using-jolt-in-a-nested-JSON-response/m-p/349492#M235675</link>
      <description>&lt;P&gt;&lt;a href="https://community.cloudera.com/t5/user/viewprofilepage/user-id/99595"&gt;@AmiJhones&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I've answer a similar question before:&amp;nbsp;&lt;A href="https://community.cloudera.com/t5/Support-Questions/Json-Jolt-to-Remove-All-Nulls-from-Json/td-p/336008" target="_blank"&gt;https://community.cloudera.com/t5/Support-Questions/Json-Jolt-to-Remove-All-Nulls-from-Json/td-p/336008&lt;/A&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;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 03 Aug 2022 23:24:18 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Removing-Null-Values-using-jolt-in-a-nested-JSON-response/m-p/349492#M235675</guid>
      <dc:creator>araujo</dc:creator>
      <dc:date>2022-08-03T23:24:18Z</dc:date>
    </item>
  </channel>
</rss>

