In Oracle 19c i have stored json data in Clob column in below format.
{ “Groups”: [ {“Group”: “Grp1″,”Parties”:[“GOPU ANAND”,”RITA SOMAN”]} , {“Group”: “Grp2″,”Parties”:[“ABBY”,”SUSY”]} ]
we need to search this json data for a string if it is available the data has to be displayed as below.
The group which contains the Party name only should be displayed.
when we search with GO%, The data should be displayed in below rows and columns using json_textcontains.
Groups Parties
Grp1 GOPU ANAND,RITA SOMAN
How to achieve this using json_textcontains.
what should be the select clause to get the individual Group
select * from json_table where json_textcontains(data_json,’$.Groups.Group.Parties’,’GO%’)