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

Adding support for Jsonpath with && and || logical operators #34

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

mpujari
Copy link

@mpujari mpujari commented Jan 3, 2022

Issue: #33

@@ -112,6 +118,18 @@ class JsonPathExamplesSpec extends Specification with SpecHelpers {
"Books that cost more than 10 USD" in {
json.extract[String](fromPath("$.store.book[?(@.price > 10)].title")) must be_==(Seq("Sword of Honour"))
}
"Books that cost more than 10 USD and with category as fiction" in {
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

But the PR won't work for multiple && or || operators as below

"Books that cost more than 10 USD and with category as fiction" in {
  json.extract[String](fromPath("$.store.book[?(@.author == 'Evelyn Waugh' && @.price > 10 && @.category == 'fiction')].title")) must be_==(Seq("Sword of Honour"))
}

@mpujari mpujari force-pushed the support-for-add-or-operators branch from 9dec7c5 to e16cf7f Compare January 3, 2022 06:20
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

Successfully merging this pull request may close these issues.

1 participant