title: Apache Spark: Convert column with a JSON String to new Dataframe in Scala spark
body: <p>I have a DataFrame with a column of string type, this string is a JSON format, I wanted to convert this column to multiple columns based on this JSON format. I can do it if I have the JSON schema, but I don't have it. </p>
  
  <p><strong>Example</strong>:</p>
  
  <p>Original Dataframe: </p>
  
  
  
  <pre class="lang-none prettyprint-override"><code>---------------------
  |        json_string|
  ---------------------
  |{"a":2,"b":"hello"}|
  |   {"a":1,"b":"hi"}|
  ---------------------
  </code></pre>
  
  <p>After Conversion/Parse</p>
  
  <pre class="lang-none prettyprint-override"><code>--------------
  |  a |     b |
  --------------
  |  2 |  hello|
  |  1 |     hi|
  --------------
  </code></pre>
  
  <p>I using Apache Spark 2.1.1.</p>