Skip to Main Content

SQL & PL/SQL

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!

Nested Dynamic JSON in PL/SQL

Rithu RajJul 25 2022 — edited Jul 25 2022

Hi Team,
I have a the following Json in one of the blob column of my table and would like to parse and source into table.
Sample Json: (It can be dynamic and nodes can be added at any parent)
{
"SampleDescription": " sample description Sample. ",
"SampleType": "Sample",
"SampleStrm": "Test",
"SampleMat": {
"Child (s)": {
"Info": 3,
"Context": 1
},
"Node (s)": {
"Detail": 3,
"Complex": 1
}
},
"Sample Voltage": [
"1000 MW/min (s)",
"3000 MW/min (s)"
]
}
Now I have to parse them and store them in the below format
image.pngCan someone please assist?

This post has been answered by Paulzip on Jul 25 2022
Jump to Answer

Comments

Paulzip
Answer

Odie has a flattening approach here, which should give you what you want.

Marked as Answer by Rithu Raj · Jul 27 2022
Rithu Raj

@paulzip Thank you so much. It really simplified my job.

1 - 3

Post Details

Added on Jul 25 2022
3 comments
492 views