So I have this schema, and I want to get all column names that have strings on it
val schema = StructType(Array(
StructField("id", IntegerType),
StructField("nested", StructType(Array(
StructField("value1", StringType),
StructField("value2", StringType)
))),
StructField("name", StringType)
))
I want to get
Seq("nested.value1","nested.value2","name")
This is just an example, but it should work and multiple nested levels