spark85 / json-path

Automatically exported from code.google.com/p/json-path
0 stars 0 forks source link

add raw array filtering support #28

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. When I try to access this json {"contents": ["one","two","three"]}
   by executing this expression "$.contents[?(@=='two')]"

What is the expected output? What do you see instead?
"two" should be returned, but instead an empty result is returned.
The same happens for other filters like [?(@>2)]

What version of the product are you using? On what operating system?
0.8.1

Please provide any additional information below.
This behaviour is needed to verify for example that a value is contained in an 
array. When filtering a map array this works, in the json {"contents": 
["reference":"one","reference":"two"]} expression 
"$.contents[?(@.reference=='two')]" returns an element.

Original issue reported on code.google.com by jirubi...@gmail.com on 21 Feb 2013 at 4:12

GoogleCodeExporter commented 9 years ago
This is fixed in 0.9.0 that will be released soon.

Original comment by kalle.st...@gmail.com on 20 Aug 2013 at 11:24