&& operator jsonpath

26 views
Skip to first unread message

Shashi Ramakrishna

unread,
Nov 7, 2016, 8:27:07 PM11/7/16
to JsonPath
On the book store example provided here. I would like to query on the entire object.

if (   $..[?(@.price == 12.99 && @.price == 8.99)]  )  {
    
      Do
}


Expected answer from the IF condition (query) would be 

  {
                "category": "fiction",
                "author": "Evelyn Waugh",
                "title": "Sword of Honour",
                "price": 12.99
            },
            {
                "category": "fiction",
                "author": "Herman Melville",
                "title": "Moby Dick",
                "isbn": "0-553-21311-3",
                "price": 8.99
            },

How to construct such query?
Reply all
Reply to author
Forward
0 new messages