2013-11-24 87 views
0

我很难弄清楚如何根据实体模式内的嵌套json对象提供过滤器参数。我可以很容易地使用外部基本字段,比如filter =“givenName ='Taylor'”,但是在数据层次结构中更深层次,我找不到一种方法来实现它。在Janrain的entity.find中使用复杂的过滤器

除此之外,我无法找出如何提供过滤器参数来查询包含特定提供程序(如facebook)的记录。我看到的唯一方法是查看“profiles”下的每个json对象,然后是“accessCredentials”,然后是“domain”。

另一个例子是当我试图使用“gender ='male'”作为过滤器时。由于性别不在模式的外层,所以这似乎不起作用。它存在于Facebook个人资料中,然后是性别,所以我假设过滤器需要能够在较低级别或沿着某种路径特定该密钥。

感谢您的任何建议!

回答

1

为了在搜索模式中深入几个级别,可以使用点或斜线表示法。

profiles.profile.quotes.quote = 'Love is a snowmobile racing across the tundra and then suddenly it flips over, pinning you underneath. At night, the ice weasels come. - Matt Groening' 

profiles/profile/quotes/quote = 'wat' 

至于性别,您可以尝试

gender = 'male' OR profiles.profile.gender = 'male' 
+0

那伟大的工作。拉扯facebook用户,我使用了filter = profiles.domain = facebook.com。这是“小点”符号,深入到我失踪的嵌套级别,并找不到任何文档。我无法使斜线符号工作。谢谢。 –