0
我有一個jsonfile是parsed.The JSON格式解析jsonfile是這樣的:如何與火花
{"cv_id":"001","cv_parse": { "educations": [{"major": "English", "degree": "Bachelor" },{"major": "English", "degree": "Master "}],"basic_info": { "birthyear": "1984", "location": {"state": "New York"}}}}
我必須讓每一個字在file.How我可以從一個陣列得到"major"
我是否必須使用方法df.select("cv_parse.basic_info.location.province")
來得到「省」字?
這是我想要的結果:
cv_id major degree birthyear state
001 English Bachelor 1984 New York
001 English Master 1984 New York