用于环回的REST过滤器

时间:2016-12-09 09:37:19

标签: rest loopbackjs strongloop

将以下REST过滤器发送到环回端点

filter[where][and][0][polity]=true&filter[where][and][1][or][0][code]=test&filter[where][and][1][or][1][name]=test

生成这个JSON对象:

 {"and":[{"polity":true},{"or":[{"[code]":"test"},{"[name]":"test"}]}]}

请注意codename周围不必要的方括号。

这应该是一个简单的逻辑测试

 polity=true & (code=test || name=test)

将(更正的)JSON发送到端点的工作正常。

环回版本: 3.0.0 2.22.0

  1. 这是一个已知的错误吗?
  2. 哪个loopback模块负责将请求参数转换为where对象?

0 个答案:

没有答案