Extracting an Array Element Using a Subscript Operator
Extracting an Array Element Using a Subscript Operator
Use the subscript operator in expressions to extract one or more elements of an array.
In the transformation, create an output port of the same data type as the return value of the array element that you want to extract.
To extract more than one element in an array, create an array output port. The data type of the elements in the type configuration for the array port must match the data type of the return value of the array elements.
In the
Expression
column for the output port, click the
Open
button.
The
Expression Editor
opens.
Delete the existing expression in the editor.
Click the
Ports
tab and select an array port.
Enter one or more index values within the subscript operator.
To extract array elements in a multidimensional array, enter index values within each subscript operator.