# JSON\_GET\_TYPE

Returns the Javascript type of the given JSON object.

```sql
JSON_GET_TYPE(json)

```

## Arguments

* `json`: a valid JSON value.

## Return Value

The type is returned as one of the following strings:

* “boolean”
* “double”
* “string”
* “array”
* “object”
* “null”
* Or, SQL NULL if json is not a valid JSON object.

## Examples

```sql
SELECT JSON_GET_TYPE('true');


```

```output

+-----------------------+
| json_get_type('true') |
+-----------------------+
| boolean               |
+-----------------------+

```

```sql
SELECT JSON_GET_TYPE('12345');


```

```output

+------------------------+
| JSON_GET_TYPE('12345') |
+------------------------+
| double                 |
+------------------------+
```

```sql
SELECT JSON_GET_TYPE('"alpha, beta, gamma"');


```

```output

+---------------------------------------+
| JSON_GET_TYPE('"alpha, beta, gamma"') |
+---------------------------------------+
| string                                |
+---------------------------------------+
```

```sql
SELECT JSON_GET_TYPE('[1,2,3]');


```

```output

+--------------------------+
| JSON_GET_TYPE('[1,2,3]') |
+--------------------------+
| array                    |
+--------------------------+
```

```sql
SELECT JSON_GET_TYPE('{"alpha”:1, "beta”:2}’);


```

```output

+----------------------------------------+
| JSON_GET_TYPE('{"alpha":1, "beta":2}') |
+----------------------------------------+
| object                                 |
+----------------------------------------+
```

```sql
SELECT JSON_GET_TYPE('null');


```

```output

+-----------------------+
| JSON_GET_TYPE('null') |
+-----------------------+
| null                  |
+-----------------------+
```

> **📝 Note**: A JSON or Javascript null value is distinct from SQL NULL.

***

Modified at: April 4, 2023

Source: [/db/v9.1/reference/sql-reference/json-functions/json-get-type/](https://docs.singlestore.com/db/v9.1/reference/sql-reference/json-functions/json-get-type/)

(An index of the documentation is available at /llms.txt)
