Skip to content

Commit 05dd0c9

Browse files
committed
Doc update
1 parent ac1a3ca commit 05dd0c9

1 file changed

Lines changed: 19 additions & 2 deletions

File tree

README.md

Lines changed: 19 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -275,8 +275,25 @@ This tool, JSONPath.sh, is really handy for handing json formatted
275275
data to other tools, and using pass-through mode (-p) comes in quite
276276
handy for creating complex queries and outputting in json.
277277

278-
Pass-through mode reads the standard output JSONPath.sh (or JSON.sh)
279-
produces and outputs JSON.
278+
*Standard Re-injection* allows the user to overcome the limitation
279+
of a single filter expression per invocation. To do this the first
280+
query, or set of queries, should output in JSON format using the
281+
'-j' option.
282+
283+
*Usage Example*
284+
285+
Show all books with a price greater than 4 that also have a 5 star
286+
rating (note that the first process in the pipeline outputs in json):
287+
288+
```
289+
./JSONPath.sh -j -f test/valid/goessner.net.expanded.json \
290+
'$..book[?(@.price>4)]' | ./JSONPath.sh \
291+
'$..book[?(@.rating==5)].title'
292+
```
293+
294+
*Pass-through mode* reads the standard output JSONPath.sh (or JSON.sh)
295+
produces and outputs JSON. This gives the user an opportunity to filter
296+
or modify the results:
280297

281298
*Usage Example*
282299

0 commit comments

Comments
 (0)