-
-
Notifications
You must be signed in to change notification settings - Fork 728
Closed
Labels
Milestone
Description
This seems like a basic question but I can't find examples anywhere in the documentation.
If I have input like
- alpha: 1
beta: foo
gamma: 0.3
delta: bar
- alpha: 2
beta: baz
gamma: 1.23
delta: buzz
And I want to select only the beta and delta keys, so that I get the following output:
- beta: foo
delta: bar
- beta: baz
delta: buzz
How do I do it? Every example in the documentation is only selecting a single key.
The equivalent in jq would be something like:
jq '.[] | .beta, .delta'
or
jq '.[] | {beta, delta}'
alikulov, macropin, jthegedus, ErnHem, jghal and 6 more