Hi!
We use ords version 21.4.2.r0621806 and pl/sql packages returning one ref cursor.
Example
declare
l_cur SYS_REFCURSOR;
begin
open l_cur for
Select JSON_OBJECTAGG( DEPARTMENT_NAME VALUE
( select JSON_ARRAYAGG( JSON_OBJECT('name' VALUE FIRST_NAME,
'lastname' value LAST_NAME,
'email' value EMAIL) )
from EMPLOYEES e where e.DEPARTMENT\_ID = d.DEPARTMENT\_ID ) returning clob
) as
from DEPARTMENTS d;
:res := l_cur;
end;
If I add the "{}test" at the end the output will be json but it will also add a add "test" o the output.
"
returning clob
) as "{}test"
from DEPARTMENTS d;
"
How can we achieve this without the extra level in json output still using pl/sql package and one out ref cursor ?
I can use sys.htp.prn ( I think) but we want to use the ORDS stuff.
Best regards Ola