SELECT'{"a":"ceshi","b":[1,2,3]}' ::json->>'b'as result
#> 操作符
SELECT'{"a":"ceshi","b":[1,2,3]}' ::json#>'{b,1}' as result
SELECT'{"a":"ceshi","b":[{"e":5},{"f":6},{"g":7}]}' ::json#>'{b,1,f}' as result
#>> 操作符
SELECT'{"a":"ceshi","b":[1,2,3]}' ::json#>>'{b,1}' as result
SELECT'{"a":"ceshi","b":[{"e":5},{"f":6},{"g":7}]}' ::json#>>'{b,1,f}' as result
进阶
SELECT'{"a":"ceshi","b":[{"e":5},{"f":6},{"g":7}]}' ::json#>>'{b,1,f}' as result;-- 等价于SELECT(('{"a":"ceshi","b":[{"e":5},{"f":6},{"g":7}]}' ::json->'b')->1)->'f'as result;
SELECT'{"a":"ceshi","b":[{"e":5},{"f":6},{"g":7}]}' ::json#>'{b,1}' as result-- 等价于SELECT('{"a":"ceshi","b":[{"e":5},{"f":6},{"g":7}]}' ::json->'b')->1as result