Skip to Main Content

ORDS, SODA & JSON in the Database

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Extract raw JSON values

roryg18Nov 5 2018 — edited Nov 5 2018

Using 12.1 (Potentially upgrading to 12.2 soon, in case that offers a solution)

Hi All,

I was wondering if there was a way to extract out raw JSON that is not a simple string/number, etc. without having to do further parsing.

e.g.

{

"key1": "string",

"key2": 0,

"key3": [{"arrKey1": "value1"},{"arrKey2": "value2"}]

}

Were I to use json_value(json, '$.key3') from dual I would like to get back the array value in raw form in a varchar. So, [{"arrKey1": "value1"},{"arrKey2": "value2"}}].

I searched for quite a while but came up empty handed, perhaps I was searching the wrong thing?

Thank You,

Rory.

This post has been answered by Pierre Yotti on Nov 5 2018
Jump to Answer
Comments
Post Details
Added on Nov 5 2018
6 comments
4,049 views