Не могу понять, чего не хватает, чтобы вытащить массив с колонками name и index из JSON.
select * from json_to_recordset(select '{"title": "Статистика по кассирам",
"filters": [{"name": "Дата с", "value": "01.01.1999", "property": "datebeg"},
{"name": "Дата по", "value": "01.12.2999", "property": "dateend"}],
"selection": [{"name": "ФИО", "index": 0, "orderby": 0, "property": "user_name", "isvisible": true},
{"name": "Отдел", "index": 1, "orderby": 0, "property": "ware_name", "isvisible": true}]}':: jsonb -> 'selection')
as x(name text, index int) order by index
Спасибо