Returns the type of a JSON value (object, array, string, number, boolean, or null).
STRINGDiperbarui: 13 Jun 2026JSON_TYPE(json_expression)The JSON value whose type to check
1 SELECT 2 JSON_TYPE(JSON '{"a": 1}') as obj_type, 3 JSON_TYPE(JSON '[1, 2]') as arr_type, 4 JSON_TYPE(JSON '"hello"') as str_type, 5 JSON_TYPE(JSON '123') as num_type, 6 JSON_TYPE(JSON 'null') as null_type;
Identifies the type of various JSON values.
| obj_type | arr_type | str_type | num_type | null_type |
|---|---|---|---|---|
| object | array | string | number | null |
Sudah paham JSON_TYPE? Latih langsung di browser
Latihan interaktif, langsung di browser.