The following documentation comment has been logged on the website: Page: https://www.postgresql.org/docs/16/datatype-json.html Description:
Using subscripts with square brackets is not supported, one must use -> or #> operators The given examples result in error: SELECT ('{"a": 1}'::jsonb)['a']; -- Extract nested object value by key path SELECT ('{"a": {"b": {"c": 1}}}'::jsonb)['a']['b']['c']; -- Extract array element by index SELECT ('[1, "2", null]'::jsonb)[1];