---
title: "JSON functions"
sidebarTitle: "JSON Functions"
description: "json_get and its typed variants, json_extract, and the rest of Lance's JSON accessor functions."
icon: brackets-curly
keywords: ["json_get", "json_extract", "json", "sql", "scalar function"]
availability:
embedded: unavailable
enterprise: available
---
| Function | Returns |
| --- | --- |
| `json_get(col, key)` | the value at `key`, still JSON |
| `json_get_string(col, key)` | `Utf8` |
| `json_get_int(col, key)` | `Int64` |
| `json_get_float(col, key)` | `Float64` |
| `json_get_bool(col, key)` | `Boolean` |
| `json_extract(col, path)` | `Utf8`: the value as JSON text, by path |
| `json_extract_with_type(col, path)` | a struct of the value as JSON and a type tag, by path |
| `json_exists(col, path)` | `Boolean` |
| `json_array_contains(col, value)` | `Boolean` |
| `json_array_length(col)` | length |
`json_get` returns JSON, so a typed accessor can read a field inside it:
```sql SQL icon="database"
SELECT * FROM events
WHERE json_get_string(json_get(data, 'user'), 'name') = 'Alice'
```
That works one level down. A `json_get` nested inside another `json_get` is
refused, so reach a deeper value with `json_extract` and a JSONPath instead. It
returns JSON text, so a string compares with its quotes:
```sql SQL icon="database"
SELECT * FROM events
WHERE json_extract(data, '$.user.profile.name') = '"Alice"'
```
**`json_get`, its typed variants, and `json_extract` are index-accelerated** by a
JSON scalar index on the column. The rest evaluate per row.
## What to read next {#next}
How a JSON column is stored, and reading it as a typed value.
Build the scalar index that accelerates `json_get` and `json_extract`.