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

Json path is not finding elements in tuple #67

Open
kujbol opened this issue Jan 14, 2019 · 0 comments
Open

Json path is not finding elements in tuple #67

kujbol opened this issue Jan 14, 2019 · 0 comments

Comments

@kujbol
Copy link

kujbol commented Jan 14, 2019

Hello, it looks like valid jsonpath query is not finding elements on tuple
example:

from jsonpath_rw import parse
p = parse('$..amount')
data = {'list': [{'amount': 1}], 'tuple': ({'amount': 1},)}
print(len(p.find(data)))

Out: 1

from jsonpath_rw import parse
p = parse('$..amount')
data = {'list': [{'amount': 1}], 'list2': [{'amount': 1},]}
print(len(p.find(data)))

Out: 2

Is it expected behaviour as tuples cannot be modified ?

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

1 participant