how to create a nested(unflatten) json from flatten json

SailajaB
Databricks Partner

Hi ,

Is there any function in pyspark which can convert flatten json to nested json.

Ex : if we have attribute in flatten is like a_b_c : 23

then in unflatten it should be

{"a":{"b":{"c":23}}}

Thank you