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

Filtering data using different conditions on same column only filters data using the second condition #1979

Closed
samwata opened this issue Jan 7, 2021 · 0 comments · Fixed by #1981
Assignees

Comments

@samwata
Copy link
Member

samwata commented Jan 7, 2021

I want to filter data using two conditions from the same column.
For instance am filtering data when enumerator name is samwata or amwata from enumerator_name column using the following query.

https://api.ona.io/api/v1/data/531845?query={"$or":[{"enumerator_name":"amwata","enumerator_name":"samwata"}]}

This only filters data with enumerator name samwata only but it does not include data with enumarator name as amwata
I also tried to separate the conditions to different dictionaries but the result is the same

https://api.ona.io/api/v1/data/531845?query={"$or":[{"enumerator_name":"amwata"}, {"enumerator_name":"samwata"}]}

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

Successfully merging a pull request may close this issue.

3 participants