@@ -13,6 +13,11 @@ queries:
13
13
document : ["first", "second", "third", "forth", "fifth"]
14
14
result : null
15
15
status : open
16
+ - id : array_index_dot_notation_on_object
17
+ selector : $.2
18
+ document : {"a": "first", "2": "second", "b": "third"}
19
+ result : " second"
20
+ status : pass
16
21
- id : array_index_last
17
22
selector : $[-1]
18
23
document : ["first", "second", "third"]
@@ -111,8 +116,8 @@ queries:
111
116
- id : filter_greater_than
112
117
selector : $[?(@.key>42)]
113
118
document : [{"key": 0}, {"key": 42}, {"key": -1}, {"key": 41}, {"key": 43}, {"key": 42.0001}, {"key": 41.9999}, {"key": 100}]
114
- status : error
115
- consensus : [{"key": 43}, {"key": 42.0001}, {"key": 100}]
119
+ result : [{"key": 43}, {"key": 42.0001}, {"key": 100}]
120
+ status : pass
116
121
- id : filter_greater_than_or_equal
117
122
selector : $[?(@.key>=42)]
118
123
document : [{"key": 0}, {"key": 42}, {"key": -1}, {"key": 41}, {"key": 43}, {"key": 42.0001}, {"key": 41.9999}, {"key": 100}, {"some": "value"}]
@@ -180,6 +185,19 @@ queries:
180
185
selector : $[key]
181
186
document : {"key": "value"}
182
187
status : error
188
+ - id : key_dot_bracket_notation
189
+ selector : $.['key']
190
+ document : {"key": "value"}
191
+ status : error
192
+ consensus : " value"
193
+ - id : key_dot_bracket_notation_with_double_quotes
194
+ selector : $.["key"]
195
+ document : {"key": "value"}
196
+ status : error
197
+ - id : key_dot_bracket_notation_without_quotes
198
+ selector : $.[key]
199
+ document : {"key": "value"}
200
+ status : error
183
201
- id : key_dot_notation
184
202
selector : $.key
185
203
document : {"key": "value"}
@@ -195,6 +213,16 @@ queries:
195
213
document : {"key": null}
196
214
result : null
197
215
status : pass
216
+ - id : key_dot_notation_with_double_quotes
217
+ selector : $."key"
218
+ document : {"key": "value"}
219
+ result : null
220
+ status : open
221
+ - id : key_dot_notation_with_single_quotes
222
+ selector : $.'key'
223
+ document : {"key": "value"}
224
+ result : " value"
225
+ status : open
198
226
- id : recursive_array_index
199
227
selector : $..[0]
200
228
document : ["first", {"key": ["first nested", {"more": [{"nested": ["deepest", "second"]}, ["more", "values"]]}]}]
@@ -204,6 +232,16 @@ queries:
204
232
document : {"object": {"key": "value", "array": [{"key": "something"}, {"key": {"key": "russian dolls"}}]}, "key": "top"}
205
233
result : ["top", "value", "something", {"key": "russian dolls"}, "russian dolls"]
206
234
status : pass
235
+ - id : recursive_key_with_double_quotes
236
+ selector : $.."key"
237
+ document : {"object": {"key": "value", "array": [{"key": "something"}, {"key": {"key": "russian dolls"}}]}, "key": "top"}
238
+ result : []
239
+ status : open
240
+ - id : recursive_key_with_single_quotes
241
+ selector : $..'key'
242
+ document : {"object": {"key": "value", "array": [{"key": "something"}, {"key": {"key": "russian dolls"}}]}, "key": "top"}
243
+ result : ["top", "value", "something", {"key": "russian dolls"}, "russian dolls"]
244
+ status : open
207
245
- id : recursive_on_nested_object
208
246
selector : $.store..price
209
247
document : {"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}}}
@@ -252,9 +290,8 @@ queries:
252
290
- id : wildcard_bracket_notation_with_key_on_nested_objects
253
291
selector : $[*].bar[*].baz
254
292
document : [{"bar": [{"baz": "hello"}]}]
255
- result : [null]
256
- status : fail
257
- consensus : ["hello"]
293
+ result : ["hello"]
294
+ status : pass
258
295
- id : wildcard_dot_notation_on_array
259
296
selector : $.*
260
297
document : ["string", 42, {"key": "value"}, [0, 1]]
0 commit comments