Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Question for filter/search on nested properties #149

Open
kojilab opened this issue Dec 14, 2016 · 2 comments
Open

Question for filter/search on nested properties #149

kojilab opened this issue Dec 14, 2016 · 2 comments

Comments

@kojilab
Copy link

kojilab commented Dec 14, 2016

Hi,

I'm trying to do a search/filter on nested properties using the library but can't figure it out.
Any good example for something like this where I want to search for "Joe".
Thanks!!!

[ 
'id' => 123,
'customer' => [
  'name' => Joe
]
]
@jarodium
Copy link

jarodium commented Mar 1, 2017

+1

@sherl0k
Copy link

sherl0k commented Apr 18, 2017

I too, have been trying, and failing to find a function that pulls it off. You can do something like this, but you're stuck with only a subset of the data since your filter is limited to the lowest point in the tree.

$cursor = r\table("mytable")->getField('customer')->filter(array('name' => 'joe'))->run($conn);

@danielmewes I've asked for help on this in the rethinkdb php slack channel as well. Is this even possible with the library?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants