Select your cookie preferences

We use essential cookies and similar tools that are necessary to provide our site and services. We use performance cookies to collect anonymous statistics, so we can understand how customers use our site and make improvements. Essential cookies cannot be deactivated, but you can choose “Customize” or “Decline” to decline performance cookies.

If you agree, AWS and approved third parties will also use cookies to provide useful site features, remember your preferences, and display relevant content, including relevant advertising. To accept or decline all non-essential cookies, choose “Accept” or “Decline.” To make more detailed choices, choose “Customize.”

JSON_TYPEOF function

Focus mode
JSON_TYPEOF function - Amazon Redshift

The JSON_TYPEOF scalar function returns a VARCHAR with values boolean, number, string, object, array, or null, depending on the dynamic type of the SUPER value.

Syntax

JSON_TYPEOF(super_expression)

Arguments

super_expression

A SUPER expression or column.

Return type

VARCHAR

Examples

To check the type of JSON for the array [1,2] using the JSON_TYPEOF function, use the following example.

SELECT JSON_TYPEOF(ARRAY(1,2)); +-------------+ | json_typeof | +-------------+ | array | +-------------+

To check the type of JSON for the object {"name":"Joe"} using the JSON_TYPEOF function, use the following example.

SELECT JSON_TYPEOF(JSON_PARSE('{"name":"Joe"}')); +-------------+ | json_typeof | +-------------+ | object | +-------------+

On this page

PrivacySite termsCookie preferences
© 2025, Amazon Web Services, Inc. or its affiliates. All rights reserved.