How to extract JSON object from a pyspark data frame. I was able to extract data from another column which in array format using "Explode" function, but Explode is not working for Object type. Its returning with type mismatch error.

antonyj453
New Contributor II

I have tried below code to extract data which in Array:

df2 = df_deidentifieddocuments_tst.select(F.explode('annotationId').alias('annotationId')).select('annotationId.$oid')

It was working fine.. but,its not working for JSON object type. Below is column:

CreateaATAny Ideas or suggestion would be great help. Thank you.