json

JSON ->

Extracts a JSON field or zero-based array element while retaining JSON type; missing fields yield SQL NULL.

Formal Syntax & Structure

sql syntaxsql
json_or_jsonb -> key_or_index

Working Example

Example Snippetsql
SELECT '{"a":"x"}'::json -> 'a';
SQL Reference