From c24e2d610c65e7b8572a47ba42927669d6bbf498 Mon Sep 17 00:00:00 2001 From: Bruno Bigras Date: Mon, 22 Apr 2019 16:22:29 -0400 Subject: [PATCH] jq: add 'output to string' example (#2916) --- pages/common/jq.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pages/common/jq.md b/pages/common/jq.md index 88b50b5451..b8afab6158 100644 --- a/pages/common/jq.md +++ b/pages/common/jq.md @@ -29,3 +29,7 @@ - Combine multiple filters: `cat {{file.json}} | jq 'unique | sort | reverse'` + +- Output the value of a given key to a string (and disable JSON output): + +`cat {{file.json}} | jq --raw-output '"some text: \(.{{key_name}})"'`