title: How to relationalize JSON containing arrays
body: <p>I am using AWS Glue to read data file containing JSON (on S3). This one is a JSON with data contained in array. I have tried using relationalize() function but it doesn't work on array. It does work on nested JSON but this is not the data format of input.</p>
  
  <p>Is there a way to relationalize JSON with arrays in it?</p>
  
  <p>Input data:</p>
  
  <pre><code>{
      "ID":"1234",
      "territory":"US",
      "imgList":[
          {
              "type":"box"
              "locale":"en-US"
              "url":"boxart/url.jpg"
          },
          {
              "type":"square"
              "locale":"en-US"
              "url":"square/url.jpg"
          }
      ]
  }
  </code></pre>
  
  <p>Code:</p>
  
  <pre><code>dfc = Relationalize.apply(frame = datasource0, staging_path = glue_temp_storage, name = "root", transformation_ctx = "dfc")
  dfc.select('root').toDF().show()
  </code></pre>
  
  <p>Output:</p>
  
  <pre><code>+----+----------+--------+
  |ID  |territory |imgList |
  +----+----------+--------+
  |1234|       US |       1|
  +----+----------+--------+
  </code></pre>
  
  <p>Desired output:</p>
  
  <pre><code>+----+----------+-------------+---------------+---------------+
  |ID  |territory |imgList.type |imgList.locale |imgList.url    |
  +----+----------+-------------+---------------+---------------+
  |1234|       US |       box   |         en-US |boxart/url.jpg |
  +----+----------+-------------+---------------+---------------+
  |1234|       US |       square|         en-US |square/url.jpg |
  +----+----------+-------------+---------------+---------------+
  </code></pre>