github.com/lmorg/murex@v0.0.0-20240217211045-e081c89cd4ef/builtins/core/arraytools/2darray_doc.yaml (about)

     1  - DocumentID: 2darray
     2    Title: >-
     3      `2darray` 
     4    CategoryID: commands
     5    Summary: >-
     6      Create a 2D JSON array from multiple input sources
     7    Description: |-
     8      `2darray` merges multiple input sources to create a two dimensional array in JSON
     9    Usage: |-
    10      ```
    11      2darray { code-block } { code-block } -> <stdout>
    12      ```
    13    Examples: |-
    14      ```
    15      » ps -fe -> head -n 10 -> set ps 
    16      » 2darray { $ps[UID] } { $ps[PID] } { $ps[TTY] } { $ps[TIME] }
    17      [
    18          [
    19              "",
    20              "",
    21              "",
    22              ""
    23          ],
    24          [
    25              "UID",
    26              "PID",
    27              "TTY",
    28              "TIME"
    29          ],
    30          [
    31              "root",
    32              "1",
    33              "?",
    34              "00:00:02"
    35          ],
    36          [
    37              "root",
    38              "2",
    39              "?",
    40              "00:00:00"
    41          ],
    42          [
    43              "root",
    44              "3",
    45              "?",
    46              "00:00:00"
    47          ],
    48          [
    49              "root",
    50              "4",
    51              "?",
    52              "00:00:00"
    53          ],
    54          [
    55              "root",
    56              "6",
    57              "?",
    58              "00:00:00"
    59          ],
    60          [
    61              "root",
    62              "8",
    63              "?",
    64              "00:00:00"
    65          ],
    66          [
    67              "root",
    68              "9",
    69              "?",
    70              "00:00:03"
    71          ],
    72          [
    73              "root",
    74              "10",
    75              "?",
    76              "00:00:19"
    77          ],
    78          [
    79              "root",
    80              "11",
    81              "?",
    82              "00:00:01"
    83          ]
    84      ]
    85      ```
    86    Detail: |-
    87      `2darray` can have as many or as few code blocks as you wish.
    88    Synonyms:
    89    Related:
    90    - prepend
    91    - append
    92    - map
    93    - a
    94    - ja
    95    - jsplit
    96    - count
    97    - item-index
    98    - range
    99    - mtac
   100    - msort
   101    - json