Read a JSON path with operator syntax.

Section: Read JSON values

Use JSON operators

sql
sql
SELECT payload -> '$.type' AS raw_json,
       payload ->> '$.type' AS text_value
FROM events;
Explanation

`->` returns JSON text while `->>` returns a scalar SQL value when appropriate.

Learn the surrounding workflow

Compare similar commands or jump into common fixes when this command is part of a bigger troubleshooting path.

Related commands

Same sheet · prioritizing Read JSON values
Extract a JSON field
Read one property from a JSON document.
OpenIn sheetsqlsame section
Validate JSON text
Check whether a string contains valid JSON.
OpenIn sheetsqlsame section
Inspect the JSON type at a path
See whether a value is text, array, object, number, and so on.
OpenIn sheetsqlsame section
Update or insert a JSON field
Patch a document with json_set().
OpenIn sheetsql1 tag match
Remove a JSON key
Delete one path from a document.
OpenIn sheetsql1 tag match
Expand an array with json_each
Turn array elements into result rows.
OpenIn sheetsql1 tag match