title: Pyspark: explode json in column to multiple columns
body: <p>The data looks like this - </p>
  
  <pre><code>+-----------+-----------+-----------------------------+
  |         id|      point|                         data|
  +-----------------------------------------------------+
  |        abc|          6|{"key1":"124", "key2": "345"}|
  |        dfl|          7|{"key1":"777", "key2": "888"}|
  |        4bd|          6|{"key1":"111", "key2": "788"}|
  </code></pre>
  
  <p>I am trying to break it into the following format. </p>
  
  <pre><code>+-----------+-----------+-----------+-----------+
  |         id|      point|       key1|       key2|
  +------------------------------------------------
  |        abc|          6|        124|        345|
  |        dfl|          7|        777|        888|
  |        4bd|          6|        111|        788|
  </code></pre>
  
  <p>The <code>explode</code> function explodes the dataframe into multiple rows. But that is not the desired solution. </p>
  
  <p>Note: This solution does not answers my questions.
  <a href="https://stackoverflow.com/questions/50683894/pyspark-explode-dict-in-column">PySpark &quot;explode&quot; dict in column</a></p>