Commit a911615
authored
docs: convert jq examples to JMESPath queries (#515)
* docs: convert jq examples to JMESPath queries
Replace piped jq commands with redisctl's built-in -q/--query flag
and --raw option throughout documentation. This demonstrates
redisctl's native query capabilities and reduces external dependencies.
Conversions include:
- Field extraction: | jq '.field' → -q 'field'
- Array iteration: | jq -r '.[]' → -q '[]' --raw
- Filtering: | jq '.[] | select(.x=="y")' → -q '[?x==`y`]'
- Projections: | jq '{a,b}' → -q '{a: a, b: b}'
jq is intentionally retained for:
- CSV output formatting (@csv)
- Complex aggregations (group_by, add)
- Arithmetic operations (division, percentages)
- String manipulation (split, interpolation)
- JSON schema validation
Closes #514
* docs: use JMESPath extensions for remaining jq conversions
Leverage redisctl's extended JMESPath functions to convert additional
jq examples that require advanced features:
- group_by() for grouping arrays by field value
- divide()/multiply() for arithmetic operations
- sprintf() for formatted string output
- has() for key existence checks
- join() for array-to-string conversion
Remaining jq usage is limited to:
- @csv output formatting (no JMESPath equivalent)
- Pretty-printing raw JSON (jq .)1 parent dcbaf12 commit a911615
File tree
58 files changed
+315
-297
lines changed- docs/src
- api-reference
- cloud
- access-control
- commands
- core-resources
- operations
- common-features
- cookbook
- cloud
- enterprise
- enterprise
- access-control
- active-active
- advanced
- commands
- core-resources
- monitoring
- operations
- getting-started
- presentation
- reference
- tutorials
- walkthrough
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
58 files changed
+315
-297
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
364 | 364 | | |
365 | 365 | | |
366 | 366 | | |
367 | | - | |
| 367 | + | |
368 | 368 | | |
| 369 | + | |
369 | 370 | | |
370 | 371 | | |
371 | 372 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
65 | 65 | | |
66 | 66 | | |
67 | 67 | | |
68 | | - | |
| 68 | + | |
69 | 69 | | |
70 | | - | |
| 70 | + | |
71 | 71 | | |
72 | 72 | | |
73 | | - | |
| 73 | + | |
74 | 74 | | |
75 | 75 | | |
76 | 76 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
44 | 44 | | |
45 | 45 | | |
46 | 46 | | |
47 | | - | |
| 47 | + | |
48 | 48 | | |
49 | | - | |
| 49 | + | |
50 | 50 | | |
51 | 51 | | |
52 | 52 | | |
53 | | - | |
| 53 | + | |
54 | 54 | | |
55 | | - | |
56 | | - | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
57 | 60 | | |
58 | 61 | | |
59 | 62 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
138 | 138 | | |
139 | 139 | | |
140 | 140 | | |
141 | | - | |
142 | | - | |
143 | | - | |
144 | | - | |
145 | | - | |
| 141 | + | |
| 142 | + | |
146 | 143 | | |
147 | 144 | | |
148 | 145 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
204 | 204 | | |
205 | 205 | | |
206 | 206 | | |
207 | | - | |
208 | | - | |
209 | | - | |
| 207 | + | |
| 208 | + | |
210 | 209 | | |
211 | 210 | | |
212 | 211 | | |
| |||
222 | 221 | | |
223 | 222 | | |
224 | 223 | | |
225 | | - | |
226 | | - | |
| 224 | + | |
| 225 | + | |
227 | 226 | | |
228 | 227 | | |
229 | 228 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
128 | 128 | | |
129 | 129 | | |
130 | 130 | | |
131 | | - | |
| 131 | + | |
132 | 132 | | |
133 | 133 | | |
134 | 134 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
217 | 217 | | |
218 | 218 | | |
219 | 219 | | |
220 | | - | |
221 | | - | |
222 | | - | |
223 | 220 | | |
224 | | - | |
| 221 | + | |
225 | 222 | | |
226 | 223 | | |
227 | 224 | | |
| |||
231 | 228 | | |
232 | 229 | | |
233 | 230 | | |
234 | | - | |
235 | | - | |
| 231 | + | |
| 232 | + | |
236 | 233 | | |
237 | 234 | | |
238 | 235 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
295 | 295 | | |
296 | 296 | | |
297 | 297 | | |
298 | | - | |
299 | | - | |
300 | | - | |
| 298 | + | |
| 299 | + | |
| 300 | + | |
| 301 | + | |
301 | 302 | | |
302 | 303 | | |
303 | 304 | | |
304 | 305 | | |
305 | 306 | | |
306 | 307 | | |
307 | 308 | | |
308 | | - | |
309 | | - | |
| 309 | + | |
310 | 310 | | |
311 | 311 | | |
312 | 312 | | |
313 | 313 | | |
314 | 314 | | |
315 | 315 | | |
316 | | - | |
| 316 | + | |
317 | 317 | | |
318 | 318 | | |
319 | 319 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
80 | 80 | | |
81 | 81 | | |
82 | 82 | | |
83 | | - | |
| 83 | + | |
84 | 84 | | |
85 | 85 | | |
86 | 86 | | |
87 | | - | |
| 87 | + | |
88 | 88 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
217 | 217 | | |
218 | 218 | | |
219 | 219 | | |
220 | | - | |
221 | | - | |
222 | | - | |
223 | 220 | | |
224 | | - | |
| 221 | + | |
225 | 222 | | |
226 | 223 | | |
227 | 224 | | |
| |||
231 | 228 | | |
232 | 229 | | |
233 | 230 | | |
234 | | - | |
235 | | - | |
| 231 | + | |
| 232 | + | |
236 | 233 | | |
237 | 234 | | |
238 | 235 | | |
| |||
0 commit comments