SELECT JSON_UNQUOTE(JSON_EXTRACT(post, CONCAT('$[', idx, '].post_id'))) AS post_id FROM biz_person_resume, (SELECT0AS idx UNIONALLSELECT1UNIONALLSELECT2UNIONALLSELECT3UNIONALLSELECT4) AS idx_table WHERE JSON_UNQUOTE(JSON_EXTRACT(post, CONCAT('$[', idx, ']'))) ISNOTNULL;
Mysql8
1 2 3 4 5 6
SELECT JSON_UNQUOTE(JSON_EXTRACT(post_data, '$.post_id')) AS post_id FROM biz_person_resume, JSON_TABLE(post, '$[*]' COLUMNS (post_data JSON PATH '$')) AS jt WHERE id = '0033986f-32cd-42ea-a3d8-6dd853d379be'