From 47479477449cff1a76276aabd0dd07244e8cab51 Mon Sep 17 00:00:00 2001 From: Emily Grace Seville Date: Sun, 29 May 2022 13:02:22 +1000 Subject: [PATCH] jq: refresh page (#7995) * Prefer `a specific` * Fix grammar errors --- pages/common/jq.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/pages/common/jq.md b/pages/common/jq.md index a0c6fb6ee..8d9da811a 100644 --- a/pages/common/jq.md +++ b/pages/common/jq.md @@ -3,23 +3,23 @@ > A command-line JSON processor that uses a domain-specific language. > More information: . -- Execute the specified expression (print a colored and formatted json): +- Execute a specific expression (print a colored and formatted json): `{{cat path/to/file.json}} | jq '{{.}}'` -- Execute the specified script: +- Execute a specific script: `{{cat path/to/file.json}} | jq --from-file {{path/to/script.jq}}` -- Pass the specifed arguments: +- Pass specific arguments: `{{cat path/to/file.json}} | jq {{--arg "name1" "value1" --arg "name2" "value2" ...}} '{{. + $ARGS.named}}'` -- Print the specifed keys: +- Print specific keys: `{{cat path/to/file.json}} | jq '{{.key1, .key2, ...}}'` -- Print the specifed array items: +- Print specific array items: `{{cat path/to/file.json}} | jq '{{.[index1], .[index2], ...}}'` @@ -27,6 +27,6 @@ `{{cat path/to/file.json}} | jq '.[]'` -- Add/remove the specified keys: +- Add/remove specific keys: `{{cat path/to/file.json}} | jq '{{.}} {{+|-}} {{{"key1": "value1", "key2": "value2", ...}}}'`