title: how to convert nested json file into csv in scala
body: <p>I want to convert my nested json into csv ,i used</p>
  
  <pre><code>df.write.format("com.databricks.spark.csv").option("header", "true").save("mydata.csv")
  </code></pre>
  
  <p>But it can use to  normal json but not nested json. Anyway that I can convert my nested json to csv?help will be appreciated,Thanks!  </p>