title: How to convert varchar to array in Presto Athena
body: <p>My data is in <code>VARCHAR</code> format. I want to split both the elements of this array so that I can then extract a key value from the JSON.</p>
  <h3>Data format</h3>
  <pre><code>[
    {
      &quot;skuId&quot;: &quot;5bc87ae20d298a283c297ca1&quot;,
      &quot;unitPrice&quot;: 0,
      &quot;id&quot;: &quot;5bc87ae20d298a283c297ca1&quot;,
      &quot;quantity&quot;: &quot;1&quot;
    },
    
  {
      &quot;skuId&quot;: &quot;182784738484wefhdchs4848&quot;,
      &quot;unitPrice&quot;: 50,
      &quot;id&quot;: &quot;5bc87ae20d298a283c297ca1&quot;,
      &quot;quantity&quot;: &quot;4&quot;
    },
  ]
  </code></pre>
  <p>For example I want to extract <code>skuid</code> from the above column.
  So my data after extraction should look like:</p>
  <pre><code>1 5bc87ae20d298a283c297ca1
  2 182784738484wefhdchs4848
  </code></pre>
  <p>Cast to array doesn't work either:</p>
  <pre class="lang-sql prettyprint-override"><code>SELECT CAST(col AS ARRAY)
  </code></pre>
  <p>gives the following error:</p>
  <blockquote>
  <p>Unknown type: array</p>
  </blockquote>
  <p>So I am not able to un-nest the array.</p>
  <p>How do I do solve this problem in <em>Presto Athena</em>?</p>