scalar

JSON_VALUE

Extracts one scalar SQL value; PostgreSQL 17 defaults to text and offers error and empty handling. Example target: PostgreSQL 17. No tables or extensions required.

Formal Syntax & Structure

sql syntaxsql
JSON_VALUE(context_item,path)

Working Example

Example Snippetsql
SELECT JSON_VALUE('{"qty":3}'::jsonb, '$.qty');
SQL Reference