@@ -187,30 +187,31 @@ Extras
187
187
Extensions
188
188
----------
189
189
190
- +--------------+----------------------------------------------+
191
- | name | Example |
192
- +==============+==============================================+
193
- | len | - $.objects.`len` |
194
- +--------------+----------------------------------------------+
195
- | sub | - $.field.`sub(/foo\\\\ +(.*)/, \\\\ 1)` |
196
- +--------------+----------------------------------------------+
197
- | split | - $.field.`split(+, 2, -1)` |
198
- | | - $.field.`split(sep, segement, maxsplit)` |
199
- +--------------+----------------------------------------------+
200
- | sorted | - $.objects.`sorted` |
201
- | | - $.objects[\\ some_field] |
202
- | | - $.objects[\\ some_field,/other_field] |
203
- +--------------+----------------------------------------------+
204
- | filter | - $.objects[?(@some_field > 5)] |
205
- | | - $.objects[?some_field = "foobar")] |
206
- | | - $.objects[?some_field =~ "foobar")] |
207
- | | - $.objects[?some_field > 5 & other < 2)] |
208
- +--------------+----------------------------------------------+
209
- | arithmetic | - $.foo + "_" + $.bar |
210
- | (-+*/) | - $.foo * 12 |
211
- | | - $.objects[*].cow + $.objects[*].cat |
212
- +--------------+----------------------------------------------+
213
-
190
+ +--------------+-----------------------------------------------+
191
+ | name | Example |
192
+ +==============+===============================================+
193
+ | len | - ``$.objects.`len` `` |
194
+ +--------------+-----------------------------------------------+
195
+ | sub | - ``$.field.`sub(/foo\\\\+(.*)/, \\\\1)` `` |
196
+ | | - ``$.field.`sub(/regex/, replacement)` `` |
197
+ +--------------+-----------------------------------------------+
198
+ | split | - ``$.field.`split(+, 2, -1)` `` |
199
+ | | - ``$.field.`split(sep, segement, maxsplit)```|
200
+ +--------------+-----------------------------------------------+
201
+ | sorted | - ``$.objects.`sorted` `` |
202
+ | | - ``$.objects[\\some_field] `` |
203
+ | | - ``$.objects[\\some_field,/other_field] `` |
204
+ +--------------+-----------------------------------------------+
205
+ | filter | - ``$.objects[?(@some_field > 5)] `` |
206
+ | | - ``$.objects[?some_field = "foobar")] `` |
207
+ | | - ``$.objects[?some_field =~ "foobar")] `` |
208
+ | | - ``$.objects[?some_field > 5 & other < 2)] `` |
209
+ +--------------+-----------------------------------------------+
210
+ | arithmetic | - ``$.foo + "_" + $.bar `` |
211
+ | (-+*/) | - ``$.foo * 12 `` |
212
+ | | - ``$.objects[*].cow + $.objects[*].cat `` |
213
+ +--------------+-----------------------------------------------+
214
+ -
214
215
About arithmetic and string
215
216
---------------------------
216
217
@@ -228,10 +229,10 @@ Example with data::
228
229
'fish': 'bar'
229
230
}
230
231
231
- | ** cow + fish** returns ** cowfish**
232
- | ** $.cow + $.fish** returns ** foobar**
233
- | ** $.cow + "_" + $.fish** returns ** foo_bar**
234
- | ** $.cow + "_" + fish** returns ** foo_fish**
232
+ | `` cow + fish`` returns `` cowfish``
233
+ | `` $.cow + $.fish`` returns `` foobar``
234
+ | `` $.cow + "_" + $.fish`` returns `` foo_bar``
235
+ | `` $.cow + "_" + fish`` returns `` foo_fish``
235
236
236
237
About arithmetic and list
237
238
-------------------------
@@ -245,7 +246,7 @@ Example with data::
245
246
{'cow': 4, 'cat': 6}
246
247
]}
247
248
248
- | ** $.objects[\*].cow + $.objects[\*].cat** returns ** [6, 9]**
249
+ | `` $.objects[\*].cow + $.objects[\*].cat`` returns `` [6, 9]``
249
250
250
251
More to explore
251
252
---------------
0 commit comments