Closed niden closed 7 years ago
payload
is an array not an object:
set serveroutput on size unlimited;
DECLARE
indata varchar2(2000);
outdata varchar2(2000);
payloadObject json_object;
jsonArray json_array;
resultObject json_object;
BEGIN
indata := '{"payload":[{"value":113,"text":"AAA"},{"value":22,"text":"BBB"}]}';
payloadObject := json_object(indata);
json_debug.output(payloadObject);
-- up to here great! The code below does not work
jsonArray := json_array(payloadObject.get('payload'));
json_debug.output(jsonArray);
END;
@fb-datax That worked just fine. Thank you for the pointer :)
I am trying to read a node from an existing
json_object
with no success.So the
payload
node contains ajson_array
. If I try to use theget
on the object and assign it to ajson_object
variable, clearly it doesn't work. Changing the type tojson_array
again does not work .How can I get the array stored into the
payload
node of my original object?