Is there a way to populate a client side javascript object, for use in visualisation libraries like D3 or Paper.JS via ORACLE APEX, without the ORDS REST service?
i.e. can I use the javascript API, or PL/SQL (APEX_JSON?) for example to run a query, and return into a client side javascript object the json response?
I know how to return JSON into a PL/SQL Dynamic Content region for example using PL/SQL (see below), but if I just want the data to get returned into a client side javascript object - whats the process? The query below does output formatted JSON into the REGION output, but I just want the json in memory as a javascript array, ready to pass to another javascript library.
declare
l_cursor sys_refcursor;
BEGIN
OPEN l_cursor for SELECT A.UID,
cursor(SELECT PREFERRED_NAME FROM DIM_PRODUCT WHERE PRODUCT_ID = A.PRODUCT_ID) as PRODUCTS from ARIEL.MARKETED_PRODUCT A WHERE STATE = 'C';
APEX_JSON.write(l_cursor);
END;
Regards
Stephen