pop

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

Properties

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

Example

Given a job variable named fruits with value ["apple","banana","orange"]:

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

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

Pop From Array task