title: How to extract values from json string?
body: <p>I have a file which has bunch of columns and one column called <code>jsonstring</code> is of string type which has json strings in it… let's say the format is the following:</p>
  
  <pre><code>{
      "key1": "value1",
      "key2": {
          "level2key1": "level2value1",
          "level2key2": "level2value2"
      }
  }
  </code></pre>
  
  <p>I want to parse this column something like this: jsonstring.key1,jsonstring.key2.level2key1 to return value1, level2value1</p>
  
  <p>How can I do that in scala or spark sql.</p>