Json can have either a single value or an array of multiple values as a property value. E.g., "A":"ae" or "A":["ab", "cd"]
When I read json-nd files (each line is a json), my target property may have a single value or an array of the same type value.
I need to use explode() to get the data. but when a single value is shown, then explode() complains.
So, my question is how to make all values of a certain property become an array in spark dataframe?