SQLite JSON Functions Cheatsheet/Inspect the JSON type at a path

See whether a value is text, array, object, number, and so on.

Section: Read JSON values

Inspect the JSON type at a path

sql
sql
SELECT json_type(payload, '$.user') FROM events;
Explanation

Helpful when cleaning inconsistent payloads from multiple producers.

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
Use JSON operators
Read a JSON path with operator syntax.
OpenIn sheetsqlsame section
Validate JSON text
Check whether a string contains valid JSON.
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