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!

How to append json_array based on another array and counter variable

User_CI7SYNov 23 2021

Hi Team, I want to append one array(Array name=Attributes) inside json_object_t final_jsonarr_p_batch based on one field count (for each element of final_jsonarr_p_batch) which is present in final_jsonarr_p_batch and also one more json_object_t dist_data. Could you please help me write the code? Is it possible?
dist_data: {"count":1,"dipid":"VISTA|078502","Distance":20,"Attributes":[{"AttributeTypeID":2},{"AttributeTypeID":5}]}
final_jsonarr_p_batch :{"count":1,"dipid":"VISTA|078502","Distance":20}
Above is just sample- but there are many records in each of these json_object_t with values continuing count=2,3,4...

Comments
Post Details
Added on Nov 23 2021
5 comments
525 views