【发布时间】:2020-04-17 08:37:28
【问题描述】:
我正在使用环回 4 并尝试通过 rest api 一起使用过滤器 [and] 和 [or]。我有一张这样的桌子
我想要的是show only items which has cond1 = 0 and cond2 = 0 and (cond3 = 1 or cond3 = 2 or cond3 = 3)。
json 会是这样的
{
"and": [
{
"cond1": 0
},
{
"cond2": 0
},
{
"or": [
{
"cond3":1
},
{
"cond3":2
},
{
"cond3":3
}
]
}
]
}
这是我的rest api过滤器
filter[where][and][0][cond1]=0&filter[where][and][1][cond2]=0&filter[where][and][2][or][0][cond3]=1&&filter[where][and][2][or][1][cond3]=2&&filter[where][and][2][or][2][cond3]=3
我发现了类似的帖子here,我所做的与Ebrahim Pasbani 的答案看起来相似。
但是没有得到这个结果
我要了这个
这意味着[and][2][or][0] 语法被环回理解为[neq]。我试着四处打听,但看起来其他人也和我有同样的问题,最终没有得到解决。我将不胜感激任何答案,并可能有一些解释。
感谢之前
【问题讨论】:
标签: rest filter strongloop loopback