...
Often it is helpful to iterate over an existing list in order to build a new list, as in the following example:
Code Block |
---|
forEach($name, in.name, if ($name != _NULL, addElement($usableNames, $name) ) ) |
Using the forEach function we go through every name provided in the variable in.name. We want to get a list of all the names which are not null, so for each one we test the value using the condition $name != _NULL. If the name is not null, we add it to a list called $usableNames using addElement().
...