List Operations
Combine Lists Node
Combine multiple lists into a single list
The combine lists node allows you to combine multiple lists into a single list. For example, [a, b, c] combining with [d, e, f] becomes [a, b, c, d, e, f].
Node Inputs
- Type: The type of list you want to create
- Type:
Dropdown
- Type:
- Lists: The lists you want to combine
- Type:
List<List<T>>
(based on the type of list you choose)
- Type:
Node Outputs
- Output: The combined list
- Type:
List<T>
- Example usage:
{{combine_list_0.output}}
- Type:
Example
The below example shows a pipeline that takes two lists of fruits ([“apples”, “oranges”, “peaches”] and [“grapes”, “kiwi”, “mango”]) and combines them into a single list ([“apples”, “oranges”, “peaches”, “grapes”, “kiwi”, “mango”].
- Text Node: Contains the following text:
apples,oranges,peaches
- Split Text Node: Splits the text on the comma delimiter into a list
- Text for splitting:
{{text_0.text}}
- Delimiter:
Character(s)
- Character:
,
- Text for splitting:
- Text Node: Contains the following text:
grapes,kiwi,mango
- Split Text Node: Splits the text on the comma delimiter into a list
- Text for splitting:
{{text_1.text}}
- Delimiter:
Character(s)
- Character:
,
- Text for splitting:
- Combine Lists Node: Combines the two lists into a single list
- List 1:
{{split_text_0.processed_text}}
- List 2:
{{split_text_1.processed_text}}
- List 1:
- Output: The combined list
- Output:
{{combine_list_0.output}}
- Output: