Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
extracting properties
WITH dataset AS (
SELECT '{"name": "Susan Smith",
"org": "engineering",
"projects": [{"name":"project1", "completed":false},
{"name":"project2", "completed":true}]}'
AS blob
)
SELECT
json_extract(blob, '$.name') AS name,
json_extract(blob, '$.projects') AS projects
FROM dataset
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment