-
Notifications
You must be signed in to change notification settings - Fork 26
/
INTERESTING_QUERIES
32 lines (32 loc) · 1.39 KB
/
INTERESTING_QUERIES
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
- document: [[{"key": 42}], [{"key": 1}]]
selector: "$[?(@[0].key==42)]"
- document: {"key": {"key": "string", "primitives": [{"key": 0}, 1]}}
selector: "$...key"
- document: [[0], [1, 2], [{"key": 2}, 3], 2]
selector: "$[?(@[-1]==$[-1])]"
- document: [[0], [1, 2], [{"key": 2}, 3], 2]
selector: "$[?($[42])]"
- document: [null, [0], [1, 2], [{"key": 2}, 3], 2]
selector: "$[?(42)]"
- document: [null, [0], [1, 2], [{"key": 2}, 3], 2]
selector: "$[?($[0]==null)]"
- document: [null, [0], [1, 2], [{"key": 2}, 3], {"key": 2}]
selector: "$[?(!@.key)]"
- document: [{"more": 1}, {"key": 2}]
selector: "$[?(!!@.key)]"
- document: [{"more": 1}, {"key": 2}]
selector: "$[?(!(!@.key))]"
- document: [{"more": 1}, {"key": 2}]
selector: "$[?((@.key))]"
- document: [{"key": 42}, {"key": 43}, {"key": 44}]
selector: "$[?((@.key>42) && (@.key<44))]"
- document: [{"key": 42}, {"key": 43}, {"key": 44}]
selector: "$[?((@.key>42) && (@.key<44) && (@.key>0))]"
- document: [{"key": 42}, {"key": 43}, {"key": 44}]
selector: "$[?((@.key)==42)"
- document: [{"key": 42}, {"key": 43}, {"key": 44}]
selector: "$[?((@.key==42))"
- document: [1, 2, 3]
selector: "$[?([1,2]<[3,4])]"
- document: [{"key": [1, 2]}, {"key": [2]}, {"key": [3, 4]}, {"key": [1, 2, 5]}, {"key": [3, 3]}, {"key": [4, 3]}, {"key": [0, 0]}, {"key": 1}, {"key": 3}, {"key": 4}, {"key": 5}, {"key": [5, 6]}]
selector: "$[?(@.key<[3,4])]"