I have a JSON object stored in a CLOB that represents a hierarchy:
{
"Version": 1,
"nodes": [{
"id": 0,
"Fields": ["ABC"],
"nodes": [{
"id": 1,
"Fields": ["DEF"],
"nodes": [{
"id": 2,
"Fields": ["GHI", "HIG"],
"nodes": []
}
]
}, {
"id": 3,
"Fields": ["XYZ", "YZX"],
"nodes": [{
"id": 4,
"Fields": ["UVW"],
"nodes": [{
"id": 5,
"Fields": ["RST"],
"nodes": []
}
]
}
]
}
]
}
]
}
I need to represent this as a table:
Ver id Field Parent
1 0 ABC null
1 1 DEF 0
1 2 GHI|HIG 1
1 3 XYZ|YZX 0
1 4 UVW 3
1 5 RST 4
I've tried using PL/JSON. While I am able to find individual points of data, I'm runnning into difficulties with the hierarchal nature.
APEX (and 12c) is not an option.
Can anyone help with this?
I write jSON parser with pl\sql. Could you please check and take it of you need.