【发布时间】:2021-01-24 21:53:58
【问题描述】:
下面是存储在名为“Sample”的表中的 json,列名为“argument”。我想获取所有在指定参数中具有特定值的记录。我可以查询参数名称,但不能查询特定值,因为它是一个字符串数组。 (请找到我的钥匙里面有 .)
{
"arguments":{
"app.argument1.appId":["123", "456"],
"app.argument2.testId":["546", "567"]
}
}
这给了我所有具有特定论点的记录。
select * from sample where json_exists(argument, '$.arguments."app.argument1.appId"');
但我需要匹配参数值。我在下面尝试过,但出现 JSON 表达式错误。
select * from sample where json_exists(argument, '$.arguments."app.argument1.appId[*]"?(@ == "123"));
请帮忙。提前致谢。
【问题讨论】:
标签: json oracle oracle12c exists