Hi @juanicobsider ,
I think that syntax is not fully supported yet in pyspark. As a workaround you can use expr like below:
from pyspark.sql import Row
from pyspark.sql.functions import parse_json,col, expr
json_string = '{"title":"example", "animal": "test"}'
df = spark.createDataFrame([
Row(json_col=json_string)
]
)
df = (
df.select(
parse_json(
col("json_col") ).alias("json_col")
)
)
display(df.select(expr("json_col:animal")))