iterator.push ViewHelper <vhs:iterator.push> 

Adds one variable to the end of the array and returns the result.

Example:

<f:for each="{array -> v:iterator.push(add: additionalObject, key: 'newkey')}" as="combined">
...
</f:for>

Copied!

Arguments 

subject 

DataType
mixed
Required
false
Description
Input to work on - Array/Traversable/...

add 

DataType
mixed
Required
true
Description
Member to add to end of array

key 

DataType
mixed
Required
false
Description
Optional key to use. If key exists the member will be overwritten!

as 

DataType
string
Required
false
Description
Template variable name to assign; if not specified the ViewHelper returns the variable instead.