select jsonb_extract('{"foo": {"bar": 42}}', '$.foo'); ┌────────────────────────────────────────────────┐ │ jsonb_extract('{"foo": {"bar": 42}}', '$.foo') │ ├────────────────────────────────────────────────┤ │ |7bar#42 │ └────────────────────────────────────────────────┘