Skip to Main Content

APEX

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!

Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.

Parse Nested JSON in Oracle Apex

Rithu RajJul 22 2022

Hi All,
I need to parse a dynamic JSON in Apex . I have to include checkboxes in the nested Json so that the user can select some child nodes and they have to be stored back again in DB.
Eg,.
Sample Json below, (the json nodes may different)
{"Description": "Sample", "Item": "SampleItem", "Samples": "XXX", "Number": {"ItemA (s)": {"ValA": 2, "ValB": 1}, "ItemB (s)": {"ValA": 3, "ValB": 1}}, "SampleRun": ["RunA (s)", "RunB (s)"]}
I have to include checkboxes in all the nodes that ends with (s) and when user selects I have to store the value with the node details in DB table.
Either I can add checkbox while rendering Json in Apex enabling user to select checkbox and store the value back to DB
Or I can parse the Json data, create a table with key value details along with path and later construct a region with checkbox in required places.

Not sure if my approaches are right. Please assist me further.

Comments

Processing

Post Details

Added on Jul 22 2022
0 comments
264 views