InvertEveryTwoItems
This Script is part of the Community Common Scripts Pack.#
Supported versions
Supported Cortex XSOAR versions: 6.0.0 and later.
This transformer will invert every two items in an array.
Example:
["A", "B", "C", "D"]
Result:
["B", "A", "D", "C"]
If the total of items in the array is an odd number the last item will be removed Example: ["A", "B", "C", "D", "E"] Result: ["B", "A", "D", "C"]
If the item is not an array the output will be same passed object.
Script Data#
| Name | Description |
|---|---|
| Script Type | python3 |
| Tags | transformer, list |
Inputs#
| Argument Name | Description |
|---|---|
| value |
Outputs#
There are no outputs for this script.