Skip to main content

/images/icons/xs_temp.svg Array Add to End

 array.push arrayVariable {
      value = 10
    }
ParameterPurposeExample
arrayVariableThis is the array variable you want to target with the array operationarrayVariable
valueThe value you want to apply to the array operation5
 array.push arrayVariable {
      value = 10
    }

/images/icons/xs_temp.svg Array Add to Beginning

 array.unshift arrayVariable {
      value = 10
    }
ParameterPurposeExample
arrayVariableThis is the array variable you want to target with the array operationarrayVariable
valueThe value you want to apply to the array operation5
 array.unshift arrayVariable {
      value = 10
    }

/images/icons/xs_temp.svg Array Remove From End Of

 array.pop arrayVariable as removedElement
ParameterPurposeExample
arrayVariableThis is the array variable you want to target with the array operationarrayVariable
removedElementThe variable you want to store the removed item inremovedElement
 array.pop arrayVariable as removedElement

/images/icons/xs_temp.svg Array Remove From Beginning Of

 array.shift arrayVariable as removedElement
ParameterPurposeExample
arrayVariableThis is the array variable you want to target with the array operationarrayVariable
removedElementThe variable you want to store the removed item inremovedElement
 array.shift arrayVariable as removedElement

/images/icons/xs_temp.svg Array Merge

    array.merge arrayVariable {
      value = $anotherArrayVariable
    }
ParameterPurposeExample
arrayVariableThis is the variable that contains the first array you want to merge.arrayVariable
valueThis is the second array that you want to merge. It could be a hardcoded array or from a variable.[1,2,3,4,5] $anotherArrayVariable
    array.merge arrayVariable {
      value = $anotherArrayVariable
    }

/images/icons/xs_temp.svg Find First Element In

    array.find ($arrayVariable) if (`$this == 1`) as foundElement
ParameterPurposeExample
$arrayVariableThis is the variable that contains the array you want to find the element in.$arrayVariable
ifThis is where you define the conditions of the element you want to find. Use $this to represent each individual item in the array.if (`$this == 1`)
asThe variable that you want to store the found elementfoundElement
    array.find ($arrayVariable) if (`$this == 1`) as foundElement

/images/icons/xs_temp.svg Find First Element Index In

    array.find_index ($arrayVariable) if (`$this == 1`) as foundElement
ParameterPurposeExample
$arrayVariableThis is the variable that contains the array you want to find the element in.$arrayVariable
ifThis is where you define the conditions of the element you want to find. Use $this to represent each individual item in the array.if (`$this == 1`)
asThe variable that you want to store the index of found elementfoundElement
    array.find_index ($arrayVariable) if (`$this == 1`) as foundElement

/images/icons/xs_temp.svg Has Any Element

    array.has ($arrayVariable) if (`$this == 1`) as foundElement
ParameterPurposeExample
$arrayVariableThis is the variable that contains the array you want to find the element in.$arrayVariable
ifThis is where you define the conditions of the element you want to find. Use $this to represent each individual item in the array.if (`$this == 1`)
asThe variable that you want to store the index of found elementfoundElement
    array.has ($arrayVariable) if (`$this == 1`) as foundElement

/images/icons/xs_temp.svg Has Every Element

array.every ($arrayVariable) if (`$this == 1`) as elementExists
ParameterPurposeExample
$arrayVariableThis is the variable that contains the array you want to find the element in.$arrayVariable
ifThis is where you define the conditions of the element you want to find. Use $this to represent each individual item in the array.if (`$this == 1`)
asThe variable that you want to store the resultfoundElement
array.every ($arrayVariable) if (`$this == 1`) as elementExists

/images/icons/xs_temp.svg Find All Elements

array.filter ($arrayVariable) if (`$this == 1`) as allFoundElements
ParameterPurposeExample
$arrayVariableThis is the variable that contains the array you want to find the element in.$arrayVariable
ifThis is where you define the conditions of the element you want to find. Use $this to represent each individual item in the array.if (`$this == 1`)
asThe variable that you want to store all of the found elementsallFoundElements
array.filter ($arrayVariable) if (`$this == 1`) as allFoundElements

/images/icons/xs_temp.svg Get Element Count

array.filter_count ($arrayVariable) if (`$this == 1`) as allFoundElements
ParameterPurposeExample
$arrayVariableThis is the variable that contains the array you want to find the element in.$arrayVariable
ifThis is where you define the conditions of the element you want to find. Use $this to represent each individual item in the array.if (`$this == 1`)
asThe variable that you want to store the count of all of the found elementsallFoundElements
array.filter_count ($arrayVariable) if (`$this == 1`) as allFoundElements

/images/icons/xs_temp.svg Map (Transform Each Element)

array.map ($arrayVariable) as mappedArray {
    value = $this * 2
}
ParameterPurposeExample
$arrayVariableThe array to map over.$arrayVariable
asThe variable to store the mapped array.mappedArray
valueThe expression to apply to each element. $this refers to the current element.$this * 2
array.map ($arrayVariable) as mappedArray {
    value = $this * 2
}

/images/icons/xs_temp.svg Partition (Split by Condition)

array.partition ($arrayVariable) if (`$this > 0`) as $partitioned
ParameterPurposeExample
$arrayVariableThe array to partition.$arrayVariable
ifThe condition to split the array. $this is the current element.$this > 0
asThe variable to store the result (object with true and false keys).$partitioned
array.partition ($arrayVariable) if (`$this > 0`) as $partitioned

/images/icons/xs_temp.svg Group By (Organize by Key)

array.group_by ($arrayVariable) as $grouped {
    key = $this.category
}
ParameterPurposeExample
$arrayVariableThe array to group.$arrayVariable
asThe variable to store the grouped result.$grouped
keyThe key to group by (expression using $this).$this.category
array.group_by ($arrayVariable) as $grouped {
    key = $this.category
}

/images/icons/xs_temp.svg Difference (Array Diff)

array.diff $arrayA $arrayB as $diffResult
ParameterPurposeExample
$arrayAThe array to subtract from.$arrayA
$arrayBThe array of values to remove.$arrayB
asThe variable to store the result.$diffResult
array.diff $arrayA $arrayB as $diffResult

/images/icons/xs_temp.svg Intersection (Array Intersect)

array.intersect $arrayA $arrayB as $intersectResult
ParameterPurposeExample
$arrayAThe first array.$arrayA
$arrayBThe second array.$arrayB
asThe variable to store the result.$intersectResult
array.intersect $arrayA $arrayB as $intersectResult

/images/icons/xs_temp.svg Union (Unique Merge)

array.union $arrayA $arrayB as $unionResult
ParameterPurposeExample
$arrayAThe first array.$arrayA
$arrayBThe second array.$arrayB
asThe variable to store the result.$unionResult
array.union $arrayA $arrayB as $unionResult
I