List To Text
Runs on: Shared (backend or chatbox overlay).
Joins a list into one text string using a template for each item. Use it to turn a leaderboard or entry list into something you can post in chat.
Item Format tokens
| Token | Renders as |
|---|---|
{{item}} | The whole item. Objects render as JSON. |
{{item.<field>}} | One field of an object item. Dotted paths work too. |
{{position}} | The item's 1-based position in the list. |
Any other {{token}} passes through untouched.
Inputs
| Name | Type | Description |
|---|---|---|
list | list | The list to render. |
separator | string | Text placed between items. Defaults to , . Type \n for a new line or \t for a tab, for example to show a scoreboard one entry per line in an overlay Text widget. |
Outputs
| Name | Type | Description |
|---|---|---|
text | string | The joined text. Empty for an empty list. |
Configuration
- Item Format: The per-item template. Defaults to
{{item}}. - Max Length: The joined text is trimmed to this many characters. Defaults to 500, Twitch's chat limit.
0means no limit. When items are cut, the result ends with…and N moreand never exceeds Max Length, suffix included.
Example
Sort a leaderboard by score (High → Low), take the first 5 with List Take, then feed it into List To Text with the format {{position}}. {{item.username}} ({{item.score}}) and separator \n for a !top command.