Skip to main content

Questions tagged [jq]

Questions about the command line JSON processing tool jq.

1 vote
2 answers
83 views

bash 4.4.20 and jq-1.6 on RHEL8 I get this nice output from jq and column. Hard to read, though. pgbackrest info --output=json \ | jq -r '.[] | .backup[] | "\(.type) \(.label) \(.info.delta)...
RonJohn's user avatar
  • 1,473
2 votes
1 answer
89 views

I am attempting to edit an OpenAPI specification by changing all parameters to be nullable. A parameter definition looks like this: { "name": "foo", "required": ...
miken32's user avatar
  • 607
0 votes
1 answer
195 views

I tried this script to see kubernetes volumes usage k get pods -n elk | jq -s '[flatten | .[].pods[].volume[]? | select(has("pvcRef")) ''{name: .pvcRef.name, capacityBytes, usedBytes, ...
Milenko Markovic's user avatar
6 votes
2 answers
390 views

I have a huge JSON object with an array of objects inside it. I have to add key:value pair to a specific object in the array. For example, let the input object is: { "a": { "b&...
Vlado B.'s user avatar
1 vote
1 answer
2k views

I have a JSON which looks like: { "type": "server-firmwareinventory-list-1", "members": [ { "type": "sever-hardware-firmware-1", &...
user2664304's user avatar
3 votes
2 answers
2k views

$ n="foo"; echo "{}" | jq --arg n "$n" '. += { "$n": $n }' { "$n": "foo" } My reading of https://jqlang.github.io/jq/manual/#types-and-...
Richard Barraclough's user avatar
11 votes
3 answers
853 views

I'd like to pretty print the ip addresses and show the output in in tabular format, including all the meta data such as valid_lft, temporary, etc. I figured out that ip -j addr show eth0 is giving me ...
hanjo's user avatar
  • 235
3 votes
2 answers
383 views

[ { "key": "@timestamp", "value": "2024-08-21 03:02:57.871" }, { "key": "@message", "value": "Aug 21, ...
Anil Samuel's user avatar

15 30 50 per page
1
2 3 4 5
28