split-list
Description
split-list
adaptor splits a list into two lists at the first instance of a specified separator value.
Inputs
list
Type: list
Required: Yes
The list to be split.
separator
Type: text
Required: Yes
The value at which the list is split.
append
Type: boolean
Required: No
Whether to append the separator value to the first list. If unspecified, defaults to False
.
prepend
Type: boolean
Required: No
Whether to prepend the separator value to the second list. If unspecified, defaults to False
.
Outputs
first
Type: list
A list containing the values before the separator value.
second
Type: list
A list containing the values after the separator value.
Examples
Example 1: Default behaviour.
Inputs:
list
:
100
2
1
10
200
separator
: 1
append
: null(empty)
prepend
: null(empty)
Outputs:
first
:
100
2
second
:
10
200
-> Split a list into two based on the separator 1
.
Example 2: Append separator value to the list.
Inputs:
list
:
100
2
1
10
200
separator
: 1
append
: null(empty)
prepend
: True
Outputs:
first
:
100
2
1
second
:
10
200
-> Split a list into two based on the separator 1
and appended the value.
Example 3: Prepend separator value to the list.
Inputs:
list
:
100
2
1
10
200
separator
: 1
append
: null(empty)
prepend
: True
Outputs:
first
:
100
2
second
:
1
10
200
-> Split a list into two based on the separator 1
and prepended the value.
Last updated