I have a database column (named "details") formatted as a JSON object that contains the following data:
'{"300-000012": {"is_complete": "False", "is_in_progress": "True"},
"300-000018": {"is_complete": "True", "is_in_progress": "False"}}'
I can't seem to convert the Array into Columns. I've tried
SELECT mh.*, jt.*
FROM history AS mh,
JSON_TABLE (mh.details, '$[*]'
COLUMNS (
NESTED PATH '$.*' COLUMNS (jt_complete VARCHAR(255) PATH '$.is_complete'),
NESTED PATH '$.*' COLUMNS (jt_progress VARCHAR(255) PATH '$.is_in_progress')
)
) AS jt)
But I get an Error Code
Error Code: 3143. Invalid JSON path expression
Ideally I would get something like:
details jt_complete jt_progress
300-000012 FALSE TRUE
300-000018 TRUE FALSE
Any help would be appreciated. Thx