title: Get the value of a key if exists in one array elements in a variant column in snowflake
body: <p>I have a variant column which has array of objects. I need to get the value of orgId (iVtXg1iwVmT9Q)from this array. How do I do that? There will be only one <strong>orgId</strong> but I don't know the element index. The below example the answer is mycolumn[1].data.orgId</p>
  <pre><code>[{
             &quot;data&quot;: {
                &quot;isCustomerAuthenticated&quot;: false,
                &quot;visibility&quot;: &quot;open&quot;
             },
             &quot;schema&quot;: &quot;jsonschema/2-0-0&quot;
         },
         {
             &quot;data&quot;: {
                 &quot;orgId&quot;: &quot;iVtXg1iwVmT9Q&quot;,
                 &quot;site&quot;: &quot;us-abcde.qa&quot;,
                 &quot;stage&quot;: &quot;staging&quot;
             },
             &quot;schema&quot;: &quot;jsonschema/1-0-0&quot;
         },
         {
             &quot;data&quot;: {
                 &quot;onboardingType&quot;: &quot;form&quot;
             },
             &quot;schema&quot;: &quot;jsonschema/1-0-1&quot;
         }
     ]
  </code></pre>