title: Flatten nested JSON in snowflake
body: <p>this is an example of a JSON (it can be more, or less, types and/or values.
  I want to end up with (order not important):</p>
  <p>Countries, IC
  Countries, ES
  Countries, SE
  Countries, GB
  Countries, US
  Categories, film-chat</p>
  <p>JSON</p>
  <pre><code>{
    &quot;list&quot;: [
      {
        &quot;element&quot;: {
          &quot;comparison&quot;: &quot;anyOf&quot;,
          &quot;logical&quot;: &quot;and&quot;,
          &quot;type&quot;: &quot;Countries&quot;,
          &quot;value&quot;: {
            &quot;list&quot;: [
              {
                &quot;element&quot;: &quot;IC&quot;
              },
              {
                &quot;element&quot;: &quot;ES&quot;
              },
              {
                &quot;element&quot;: &quot;SE&quot;
              },
              {
                &quot;element&quot;: &quot;GB&quot;
              },
              {
                &quot;element&quot;: &quot;US&quot;
              }
            ]
          }
        }
      },
      {
        &quot;element&quot;: {
          &quot;comparison&quot;: &quot;anyOf&quot;,
          &quot;logical&quot;: &quot;and&quot;,
          &quot;type&quot;: &quot;Categories&quot;,
          &quot;value&quot;: {
            &quot;list&quot;: [
              {
                &quot;element&quot;: &quot;film-chat&quot;
              }
            ]
          }
        }
      }
    ]
  }
  </code></pre>
  <p>What I've tried so far, probably iteration 17:
  Can't past more code apparently... Need more details.</p>