SQLite JSON_TREE() Function
Example
Return all the values in a JSON text:
SELECT fullkey, type, atom
FROM JSON_TREE('{"a": 1, "b": [2, 3]}');
Try it Yourself »
Definition and Usage
JSON_TREE() is a table valued function, like JSON_EACH(). It walks through the whole JSON text, also arrays and objects inside other values, and returns one row for each value.
Note: Read more about JSON in the SQLite JSON chapter.
Tip: Also look at JSON_EACH().
Syntax
SELECT * FROM JSON_TREE(json, path)
Parameter Values
| Parameter | Description |
|---|---|
| json | Required. The JSON text |
| path | Optional. A path to the part of the JSON to use |
Technical Details
| Return type: | Rows |
|---|