Back to Playground Home

Extract values from a JSON column

select json_extract_scalar(json_field, '$.details.collaborator', 'STRING') AS collaborator,
       json_extract_scalar(json_field, '$.details.score', 'INT') AS score,
       json_field
from users 
ORDER BY score DESC
limit 10