tablebyrows
.tablebyrows headers:{List<Any> = emptyList()} rows:{List<Iterable<out Any>>} -> NodeContent copied to clipboard
Generates a table from a list of rows, where each row is a list of cell values. Optionally, headers can be provided for the columns.
Example:
.var {headers}
- Name
- Age
- City
.tablebyrows {.headers}
- - John
- 25
- NY
- - Lisa
- 32
- LA
- - Mike
- 19
- CHIContent copied to clipboard
Result:
| Name | Age | City |
|------|-----|------|
| John | 25 | NY |
| Lisa | 32 | LA |
| Mike | 19 | CHI |Content copied to clipboard
Return
the generated Table node
Parameters
context
the current context, injected automatically
rows
list of rows, where each row is an iterable of cell values. Rows can have varying lengths; missing cells will be filled with empty content.