add remove language chart show hidden hide
db<>fiddle
donate feedback about
By using db<>fiddle, you agree to license everything you submit by Creative Commons CC0.
Records: 2  Duplicates: 0  Warnings: 0
Records: 4  Duplicates: 0  Warnings: 0
json_object('role', (select json_arrayagg(r1.role_name) from json_table(t.value, '$.roles[*]' columns(role int path '$')) r join roles r1 on r.role = r1.id))
{"role": ["Admin", "Finance", "Payroll", "Accountant"]}
{"role": ["Admin", "Accountant"]}