with MY_TABLE as (
select 'value1' as col1, 'value2' as col2, 'value3' as col3, 'value4' as col4
from dual
)
select JSON_ARRAY(JSON_OBJECT('col1' value col1, 'col2' value col2),JSON_OBJECT('col3' value col3, 'col4' value col4))
from MY_TABLE
JSON_ARRAY(JSON_OBJECT('COL1'VALUECOL1,'COL2'VALUECOL2),JSON_OBJECT('COL3'VALUECOL3,'COL4'VALUECOL4)) | [{"col1":"value1","col2":"value2"},{"col3":"value3","col4":"value4"}] |
---|