Browse Source

jq: add 'combines multiple filters' example (#2917)

Bruno Bigras 5 years ago
parent
commit
1c66acf268
1 changed files with 4 additions and 0 deletions
  1. 4 0
      pages/common/jq.md

+ 4 - 0
pages/common/jq.md

@@ -25,3 +25,7 @@
 - Output the value of a given key of each element in a JSON text from stdin:
 - Output the value of a given key of each element in a JSON text from stdin:
 
 
 `cat {{file.json}} | jq 'map(.{{key_name}})'`
 `cat {{file.json}} | jq 'map(.{{key_name}})'`
+
+- Combine multiple filters:
+
+`cat {{file.json}} | jq 'unique | sort | reverse`