Problem
Trimming a response to a few fields requires a verbose JMESPath projection that depends on the response shape. --table-columns only affects table rendering, not the json, yaml, csv, or piped output.
Solution
Add --fields <a,b,c> that keeps only the listed top-level fields. It applies to a single object, to each element of an array, and to each element of an ARM value[] wrapper (keeping the wrapper so paging links survive). It runs after --query and before formatting, so every output format and downstream pipe sees the trimmed data.
Acceptance criteria
- An object keeps only the listed keys
- An array of objects trims each element
- An ARM
value[] response trims each value element and keeps the wrapper
- Works with
--format json, table, csv, and yaml
- A non-JSON response is left unchanged with a note on stderr
- Unit tests and CLI reference docs
Problem
Trimming a response to a few fields requires a verbose JMESPath projection that depends on the response shape.
--table-columnsonly affects table rendering, not the json, yaml, csv, or piped output.Solution
Add
--fields <a,b,c>that keeps only the listed top-level fields. It applies to a single object, to each element of an array, and to each element of an ARMvalue[]wrapper (keeping the wrapper so paging links survive). It runs after--queryand before formatting, so every output format and downstream pipe sees the trimmed data.Acceptance criteria
value[]response trims each value element and keeps the wrapper--formatjson, table, csv, and yaml