title: Extract complex nested JSON array in Presto
body: <p>I have a complex JSON object like this:</p>
  
  <pre><code>  {
      "item_detail": [
        {
          "itemid": "4702385896",
          "modelid": "8307307322",
          "quantity": "1"
        },
        {
          "itemid": "3902478595",
          "modelid": "8306561848",
          "quantity": "1"
        },
        {
          "itemid": "3409528897",
          "modelid": "10922686275",
          "quantity": "1"
        },
        {
          "itemid": "4702385896",
          "modelid": "8307307323",
          "quantity": "1"
        }
      ],
      "shopid": "128449080"
    },
    {
      "item_detail": [
        {
          "itemid": "7906381345",
          "modelid": "9745718882",
          "quantity": "1"
        },
        {
          "itemid": "6710792892",
          "modelid": "11474621623",
          "quantity": "1"
        }
      ],
      "shopid": "36121097"
    }
  ]
  </code></pre>
  
  <p>I am struggling in extracting all (itemid, shopid) into rows in Presto. My wanted outcomes are: </p>
  
  <pre><code>itemid     | shopid
  -----------+-------
  4702385896 | 128449080
  3902478595 | 128449080
  3409528897 | 128449080
  4702385896 | 128449080
  7906381345 | 36121097
  6710792892 | 36121097
  </code></pre>
  
  <p>I have used CROSS JOIN UNNEST and TRANSFORM to get the result with no luck. Does anyone have a solution for this?</p>
  
  <p>So many thanks in advance!</p>