📣
TiDB Cloud Premium is now in public preview. Unlimited growth, instant elasticity, advanced security for enterprise workloads. Try it out →

IS_OBJECT



Checks if the input value is a JSON object.

Syntax

IS_OBJECT( <expr> )

Return Type

Returns true if the input JSON value is a JSON object, and false otherwise.

Examples

SELECT IS_OBJECT(PARSE_JSON('{"a":"b"}')), -- JSON Object IS_OBJECT(PARSE_JSON('["a","b","c"]')); --JSON Array ┌─────────────────────────────────────────────────────────────────────────────┐ │ is_object(parse_json('{"a":"b"}')) │ is_object(parse_json('["a","b","c"]')) │ ├────────────────────────────────────┼────────────────────────────────────────┤ │ truefalse │ └─────────────────────────────────────────────────────────────────────────────┘

Was this page helpful?