Forum Stats

  • 3,838,560 Users
  • 2,262,382 Discussions
  • 7,900,688 Comments

Discussions

Parse Nested JSON in Oracle Apex

Rithu Raj
Rithu Raj Member Posts: 42 Blue Ribbon

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.

Tagged: