SQLite JSON_REMOVE() Function
Example
Remove the age:
SELECT JSON_REMOVE(
'{"name": "Emil", "age": 30}', '$.age');
Try it Yourself »
Definition and Usage
The JSON_REMOVE() function removes the values at the given paths, and returns the new JSON.
Note: Read more about JSON in the SQLite JSON chapter.
Syntax
JSON_REMOVE(json, path, ...)
Parameter Values
| Parameter | Description |
|---|---|
| json | Required. The JSON text |
| path | Required. A JSON path, like '$.name' for a value in an object, '$[0]' for the first item in an array, or '$.a.b' for a value inside another object |
Technical Details
| Return type: | Text |
|---|