<?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: JOLT to flatten nested JSON in Support Questions</title>
    <link>https://community.cloudera.com/t5/Support-Questions/JOLT-to-flatten-nested-JSON/m-p/413558#M254136</link>
    <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://community.cloudera.com/t5/user/viewprofilepage/user-id/122413"&gt;@Sid17&lt;/a&gt;,&amp;nbsp;&lt;/P&gt;&lt;P&gt;This looks very similar to what we see here:&amp;nbsp;&lt;BR /&gt;&lt;A href="https://community.cloudera.com/t5/Support-Questions/Jolt-spec-to-flatten-the-nested-JSON/m-p/399054#M250380" target="_blank"&gt;https://community.cloudera.com/t5/Support-Questions/Jolt-spec-to-flatten-the-nested-JSON/m-p/399054#M250380&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can you take a look on that and see if it helps?&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 17 Feb 2026 17:47:01 GMT</pubDate>
    <dc:creator>vafs</dc:creator>
    <dc:date>2026-02-17T17:47:01Z</dc:date>
    <item>
      <title>JOLT to flatten nested JSON</title>
      <link>https://community.cloudera.com/t5/Support-Questions/JOLT-to-flatten-nested-JSON/m-p/412924#M253777</link>
      <description>&lt;P&gt;Hi Team,&lt;/P&gt;&lt;P&gt;I'm trying to flatten a nested JSON and it is working fine for few cases which has data but for some cases if it has [] empty then the record is not showing up in the result. Could you please help me in tackling this corner case.&lt;BR /&gt;&lt;BR /&gt;My data:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;{
  "data": {
    "getVarietyListing": {
      "edges": [
        {
          "node": {
            "id": "346595",
            "identifier": 503882,
            "description": "Estefania (PL)",
            "productLifecycleManagementAreas": []
          }
        },
        {
          "node": {
            "id": "351741",
            "identifier": 504382,
            "description": "Amsterdam 2 - ABK",
            "productLifecycleManagementAreas": [
              {
                "code": {
                  "code": "X00",
                  "description": "Prepare to retire"
                },
                "startDate": "2025-09-01",
                "futureStartDate": null,
                "futureCode": null,
                "area": {
                  "country": "EA"
                }
              },
              {
                "code": {
                  "code": "X00",
                  "description": "Prepare to retire"
                },
                "startDate": "2025-09-01",
                "futureStartDate": null,
                "futureCode": null,
                "area": {
                  "country": "FR"
                }
              },
              {
                "code": {
                  "code": "X00",
                  "description": "Prepare to retire"
                },
                "startDate": "2024-04-11",
                "futureStartDate": null,
                "futureCode": null,
                "area": {
                  "country": "IL"
                }
              },
              {
                "code": {
                  "code": "X00",
                  "description": "Prepare to retire"
                },
                "startDate": "2025-09-01",
                "futureStartDate": null,
                "futureCode": null,
                "area": {
                  "country": "NL"
                }
              },
              {
                "code": {
                  "code": "X00",
                  "description": "Prepare to retire"
                },
                "startDate": "2025-09-01",
                "futureStartDate": null,
                "futureCode": null,
                "area": {
                  "country": "TR"
                }
              },
              {
                "code": {
                  "code": "X00",
                  "description": "Prepare to retire"
                },
                "startDate": "2025-09-01",
                "futureStartDate": null,
                "futureCode": null,
                "area": {
                  "country": "GB"
                }
              }
            ]
          }
        }
      ]
    }
  }
}&lt;/LI-CODE&gt;&lt;P&gt;This is the data and I'm using the following JOLT:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;[
  {
    "operation": "shift",
    "spec": {
      "data": {
        "getVarietyListing": {
          "edges": {
            "*": {
              "node": {
                "productLifecycleManagementAreas": {
                  "*": {
                    "@(2,identifier)": "[&amp;amp;4].[&amp;amp;1].Variety",
                    "@(2,description)": "[&amp;amp;4].[&amp;amp;1].VarietyDescription",
                    "startDate": "[&amp;amp;4].[&amp;amp;1].StartDate",
                    "futureCode": {
                      "code": "[&amp;amp;5].[&amp;amp;2].FuturePlcCode"
                    },
                    "futureStartDate": "[&amp;amp;4].[&amp;amp;1].FutureStartDate",
                    "code": {
                      "code": "[&amp;amp;5].[&amp;amp;2].PlcCode",
                      "description": "[&amp;amp;5].[&amp;amp;2].PlcCodeDescription"
                    },
                    "area": {
                      "country": "[&amp;amp;5].[&amp;amp;2].Country"
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
},


  {
    "operation": "shift",
    "spec": {
      "*": {
        "*": {
          "@": "[]"
        }
      }
    }
  },
  {
    "operation": "default",
    "spec": {
      "*": {
        "Country": null
      }
    }
  }

]&lt;/LI-CODE&gt;&lt;P&gt;For the identifier&amp;nbsp;503882, I'm not getting any result becuase of&amp;nbsp;"productLifecycleManagementAreas": [] it is empty. I need to get identifier and also description and rest all attributes can be hardcoded to null.&lt;BR /&gt;&lt;BR /&gt;Your help matters a lot.&lt;BR /&gt;Thank you&lt;/P&gt;</description>
      <pubDate>Tue, 25 Nov 2025 06:28:16 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/JOLT-to-flatten-nested-JSON/m-p/412924#M253777</guid>
      <dc:creator>Sid17</dc:creator>
      <dc:date>2025-11-25T06:28:16Z</dc:date>
    </item>
    <item>
      <title>Re: JOLT to flatten nested JSON</title>
      <link>https://community.cloudera.com/t5/Support-Questions/JOLT-to-flatten-nested-JSON/m-p/413558#M254136</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://community.cloudera.com/t5/user/viewprofilepage/user-id/122413"&gt;@Sid17&lt;/a&gt;,&amp;nbsp;&lt;/P&gt;&lt;P&gt;This looks very similar to what we see here:&amp;nbsp;&lt;BR /&gt;&lt;A href="https://community.cloudera.com/t5/Support-Questions/Jolt-spec-to-flatten-the-nested-JSON/m-p/399054#M250380" target="_blank"&gt;https://community.cloudera.com/t5/Support-Questions/Jolt-spec-to-flatten-the-nested-JSON/m-p/399054#M250380&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can you take a look on that and see if it helps?&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 17 Feb 2026 17:47:01 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/JOLT-to-flatten-nested-JSON/m-p/413558#M254136</guid>
      <dc:creator>vafs</dc:creator>
      <dc:date>2026-02-17T17:47:01Z</dc:date>
    </item>
  </channel>
</rss>

