title: How to convert wrapped array to dataset in spark scala?
body: <p><a href="https://i.stack.imgur.com/5znAf.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/5znAf.png" alt="enter image description here"></a></p>
  
  <p>Hi I am new to spark scala. I have this structure in json file which I need to convert it to dataset. I am being unable to do this because of the nested data. </p>
  
  <p>I tried to do something like this which I got from some post but it does not work. Can someone please suggest me the solution?</p>
  
  <pre><code>  spark.read.json(path).map(r=&gt;r.getAs[mutable.WrappedArray[String]]("readings"))
  </code></pre>