get_json_object function

Extracts a JSON object from path.

Syntax

get_json_object(expr, path)

Arguments

  • expr: A STRING expression containing well formed JSON.

  • path: A STRING literal with a well formed JSON path.

Returns

A STRING.

If the object cannot be found null is returned.

Examples

> SELECT get_json_object('{"a":"b"}', '$.a');
 b