Hi all,
I have a table looks like: +---------+---------+ |A|B| |0|[Map(1->a),1]| |0|[Map(1->b),2]| I want to pickup the key and value in Map. My code looks like df.select($"B._2".alias("X"),$"B._1.key".alias("Y")).show The output is |X|Y| |1|null| |2|null| Would you like tell me how to get the key in Map please? My spark is 2.1.0 Thanks Fei Shao