arrayPop

The arrayPop task removes the last item from a non-empty job array variable and returns the removed item with a success finish state. If the job array variable has no elements, the task returns a failure finish state.

Properties

IncomingDescription
Select Job Variable (required)The job variable to modify.
OutgoingDescription
popped_itemThe removed item.

Example

Assume a job variable named fruits with value ["apple","banana","orange"] and you want to remove the last element.

1

Select the job variable

In the pop task’s properties dialog, select fruits from the Select Job Variables dropdown.

2

Apply the change

Click UPDATE.

The task changes fruits to ["apple","banana"] and returns "orange" in the outgoing variable popped_item.

popFromArray task with the fruits job variable selected