File tree Expand file tree Collapse file tree 1 file changed +25
-1
lines changed Expand file tree Collapse file tree 1 file changed +25
-1
lines changed Original file line number Diff line number Diff line change 58
58
keys-of-many-types) => [{:key 1 }, {:key 3 }]
59
59
; ; Filter expression with boolean or operator and value true
60
60
(at-path " $[?(@.key>0 || true)]"
61
- keys-of-many-types) => keys-of-many-types)
61
+ keys-of-many-types) => keys-of-many-types
62
+ ; ; Filter expression with value true
63
+ (at-path " $[?(@.key)]"
64
+ [{:some " some value" }
65
+ {:key true }
66
+ {:key false }
67
+ {:key nil }
68
+ {:key " value" }
69
+ {:key " " }
70
+ {:key 0 }
71
+ {:key 1 }
72
+ {:key -1 }
73
+ {:key 42 }
74
+ {:key {}}
75
+ {:key []}])
76
+ => [{:key true }
77
+ {:key false }
78
+ {:key " value" }
79
+ {:key " " }
80
+ {:key 0 }
81
+ {:key 1 }
82
+ {:key -1 }
83
+ {:key 42 }
84
+ {:key {}}
85
+ {:key []}])
62
86
; ; TODO: Filter expression with different grouped operators
63
87
; ; NOTE: the parser will need to be updated in order to get this test to work
64
88
; (at-path "$[?(@.a && (@.b || @.c))]"
You can’t perform that action at this time.
0 commit comments