As far as I know AND / OR are not supported yet. But you can get relatively close with this [,] array. But even this made me wonder when I tested it. There's some strange behaviour. I took an example JSON string from the Jayway JsonPath Evaluator and put it into JsonPath Expression Tester (because it didn't work with Jayway when I tried).
So the JSON I've tested with the curiousconcept version is:
{
"store": {
"book": [
{
"category": "reference",
"author": "Nigel Rees",
"title": "Sayings of the Century",
"price": 8.95
},
{
"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
},
{
"category": "fiction",
"author": "J. R. R. Tolkien",
"title": "The Lord of the Rings",
"isbn": "0-395-19395-8",
"price": 22.99
}
],
"bicycle": {
"color": "red",
"price": 19.95
}
},
"expensive": 10
}
And the expression:
$..book[?(@.price==8.99),?(@.category=='fiction')]
which results in:
[
{
"category":"fiction",
"author":"Herman Melville",
"title":"Moby Dick",
"isbn":"0-553-21311-3",
"price":8.99
}
]
what seems to be perfect. (take the price 8.99 AND category 'fiction'... perfect!)
BUT: change it to:
$..book[?(@.category=='fiction'),?(@.price==8.99)]
then the output is:
[
]
It seems to me that [,] is not well implemented in Jayway JsonPath Tester as well as curiousconcept.com expression tester.
But from what I know they're working on an (real) implementation of AND and or (issue27 here at google code).
Hope this clarifies at least something!