List Trimmer Node
Last updated
Last updated
This node trims a list to just contain sections you want. You can enter the number of items to keep or specify the section of the list you want to keep.
For example, for the list [a, b, c], if we were to keep 2 items, the output would be [a, b].
List: The list you want to trim
Type: List<Text>
Number of Items to Keep: When the parameter Specify Section is switched off you need to specify the number of items you want to keep.
Specify Section: When this is turned on you need to specify both the start index and end index of the section you want to keep.
Output: The trimmed list
Type: List<Text>
Example usage: {{list_trimmer_0.output}}
If you give a value in Number of Items to Keep that is greater than the length of the given list then the whole list will be returned.
If the Specify Section parameter is turned on you need to specify the indexes. The start of the list is denoted by index 0.