How to parse the JSON data using Spark-Scala
问题 I've requirement to parse the JSON data as shown in the expected results below, currently i'm not getting how to include the signals name(ABS, ADA, ADW) in Signal column. Any help would be much appreciated. I tried something which gives the results as shown below, but i will need to include all the signals in SIGNAL column as well which is shown in the expected results. jsonDF.select(explode($"ABS") as "element").withColumn("stime", col("element.E")).withColumn("can_value", col("element.V"))