Below is the json stored in a table called "Sample" and the column name is "argument". I want to fetch all those records having a particular value in a specified argument. I could query the argument name but not able to query a particular value as it is an array of strings. (Please find my keys have . in it)
{
"arguments":{
"app.argument1.appId":["123", "456"],
"app.argument2.testId":["546", "567"]
}
}
This gives me all the records having particular argument.
select * from sample where json_exists(argument, '$.arguments."app.argument1.appId"');
But I need to match argument value. I tried below but getting JSON expression error.
select * from sample where json_exists(argument, '$.arguments."app.argument1.appId[*]"?(@ == "123"));
Please help. Thanks in advance.
question from:https://stackoverflow.com/questions/65876377/query-json-array-having-only-strings-oracle