title: Merge json column names with case in-sensitive
body: <p>My JSON column names are a combination of lower and uppercase case (Ex: <code>title/Title</code> and <code>name/Name</code>), due to which in output, I am getting <code>name</code> and <code>Name</code> as two different columns (similarly <code>title</code> and <code>Title</code>).</p>
  <p>How can I make the JSON columns as case insensitive?</p>
  <p><code>config(&quot;spark.sql.caseSensitive&quot;, &quot;true&quot;)</code> -&gt; I tried this, but it is not working.</p>
  <pre><code>val df = Seq(
    (&quot;A&quot;, &quot;B&quot;, &quot;{\&quot;Name\&quot;:\&quot;xyz\&quot;,\&quot;Address\&quot;:\&quot;NYC\&quot;,\&quot;title\&quot;:\&quot;engg\&quot;}&quot;),
    (&quot;C&quot;, &quot;D&quot;, &quot;{\&quot;Name\&quot;:\&quot;mnp\&quot;,\&quot;Address\&quot;:\&quot;MIC\&quot;,\&quot;title\&quot;:\&quot;data\&quot;}&quot;),
    (&quot;E&quot;, &quot;F&quot;, &quot;{\&quot;name\&quot;:\&quot;pqr\&quot;,\&quot;Address\&quot;:\&quot;MNN\&quot;,\&quot;Title\&quot;:\&quot;bi\&quot;}&quot;)
  )).toDF(&quot;col_1&quot;, &quot;col_2&quot;, &quot;col_json&quot;)
  
  import sc.implicits._
  val col_schema = spark.read.json(df.select(&quot;col_json&quot;).as[String]).schema
  
  val outputDF = df.withColumn(&quot;new_col&quot;, from_json(col(&quot;col_json&quot;), col_schema))
         .select(&quot;col_1&quot;, &quot;col_2&quot;, &quot;new_col.*&quot;)
  
  outputDF.show(false)
  </code></pre>
  <p>Current output:<br />
  <a href="https://i.stack.imgur.com/7HfRz.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/7HfRz.png" alt="enter image description here" /></a></p>
  <p>Expected/Needed output (column names to be case-insensitive):<br />
  <a href="https://i.stack.imgur.com/hS2Fo.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/hS2Fo.png" alt="enter image description here" /></a></p>