Align columns: Difference between revisions

Content added Content deleted
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: Line 3,891:
=={{header|jq}}==
=={{header|jq}}==
{{ Works with|jq|1.4}}
{{ 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.
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
<lang jq># transpose a possibly jagged matrix
def transpose:
def transpose: