JSON
Scalar
json_extract()
Select a value from a JSON document by path while keeping the result as JSON, including quotes around JSON strings.
Reference: Haybarn WASM 2.0.0-rc12
Arguments & returns
6 overloadsjson_extract(json, index)
Scalar
json_extract(json, path)
Scalar
Extract JSON values by path
Select a value from a JSON document by path while keeping the result as JSON, including quotes around JSON strings.
A missing path produces SQL NULL. A JSON null value is a JSON value and can be distinguished with json_type().
Haybarn WASM 2.0.0-rc12 · In your browser
Guide example · Run to view results.
| first_json | missing |
|---|---|
"apple" | NULL |
Watch for: JSON arrays use zero-based positions. Use json_extract_string() when you need unquoted text for display or comparison.