Align columns: Difference between revisions
m
→{{header|jq}}: built-in
m (→{{header|Snobol}}: Output now doesn't force all fields on each line with trailing all-space columns.) |
m (→{{header|jq}}: built-in) |
||
Line 3,891:
=={{header|jq}}==
{{ Works with|jq|1.4}}
The key to the following implementation is the filter named "transpose", which is defined to work on a possibly jagged matrix. It is provided as a built-in in jq 1.5 and later.
<lang jq># transpose a possibly jagged matrix
def transpose:
|