1

I need to get a json object inside a joson object using PL/JSON. For an example,

json_obj1 json := json('{"ProcessParameters":{"foo":"bar","bar":"baz"}}');

I need to get 'ProcessParameters' object to another object. like,

json_obj2 json := get_json_object(json_obj1,'ProcessParameters');

Thank you!

Janitha Madushan
  • 1,453
  • 3
  • 28
  • 40

1 Answers1

3

I found the answer,

DECLARE
    obj json := json();
    json_object json;

BEGIN
    obj := json('{"value":{"weight":"spots","Invalid spots":"Invalid"}}');
    json_object := JSON_EXT.GET_JSON(obj,'value');

END;
Janitha Madushan
  • 1,453
  • 3
  • 28
  • 40