Hello,
i got a little problem:
I want to create a json, that contains the results of 2 query. The structure should be like following:
{"query1":[--result of query 1----], "query2": [--result of query 2--]}
i'm trying the following:
open l_cursor for v_proc;
open l_cursor2 for v_val;
apex_json.open_object;
apex_json.write('query1', l_cursor);
apex_json.write('query2', l_cursor2);
apex_json.close_object;
where v_val and v_proc are variables with type sql-query
it's working as I'm getting a result, which contains all the rows. But the format is not valid JSON. It's something like:
{"query1":[--result of query 1----], "query2":,[--result of query 2--]}
----------------------------------------------^ this comma is misplaced and the reason for an invalid format
Everthing is fine, if I'm using just one cursor, but i would prefer to have both querys in one json.
I hope anyone can help.
Regards,
Wobang