jsonpath icon indicating copy to clipboard operation
jsonpath copied to clipboard

Expression for filter path not working

Open absolution54321 opened this issue 4 years ago • 2 comments

obj = {"commands":[{"id":1,"value":false},{"id":2,"value":false},{"id":3},{"id":4,"value":true}]}
path = '$.commands[?(@.value)]'  // filter expression to fetch objects which have 'value' field.
jsonpath.query(obj, path)  // undefined

I feel boolean values break the filter expression. Any Idea guys?

absolution54321 avatar May 07 '21 10:05 absolution54321

I meet the same question >..T_T

WellerQu avatar Jul 09 '21 10:07 WellerQu

I am having the same issue. I tested my expression on http://jsonpath.herokuapp.com/ and it worked fine there, but whenever I run it in my javascript it returns an empty list.

Version: 1.1.1

sashokbg avatar Oct 22 '21 16:10 sashokbg