Skip to content

Instantly share code, notes, and snippets.

@iamrealfarhanbd
Created June 10, 2023 05:03
Show Gist options
  • Save iamrealfarhanbd/3ff4e46e6d0e7ba40c6fc4d142305414 to your computer and use it in GitHub Desktop.
Save iamrealfarhanbd/3ff4e46e6d0e7ba40c6fc4d142305414 to your computer and use it in GitHub Desktop.
SQL query to extract values from Ninja Tables JSON column without double quotation marks.Video: https://video.drift.com/v/abuayx9mvYW/
SELECT JSON_UNQUOTE(JSON_EXTRACT(value, '$.team_name')) AS team_name,
JSON_UNQUOTE(JSON_EXTRACT(value, '$.score')) AS score,
JSON_UNQUOTE(JSON_EXTRACT(value, '$.school')) AS school
FROM wp_ninja_table_items
WHERE table_id = Your_table_ID
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment