title: how to convert string to array in Spark Scala
body: <p>I have a json file, after spark.read.json, one of the column (name: js) has the following format:</p>
  
  <pre><code>{"pp":1,"its":"[{"def":false, "val":3},{"def":true, "val":2},...]"}
  </code></pre>
  
  <p>I need to explode "its", so I can know each def, and each val inside, and the numbers of defs and vals are not certain. </p>
  
  <p>When I read its, by using </p>
  
  <pre><code>val df = tmp.select($"js.its")
  </code></pre>
  
  <p>df is a DataFrame of string. Can I convert it back to Array so that I can use explode, or any other ways to know all the defs values, and all the vals values?</p>
  
  <p>many thanks</p>