InvertEveryTwoItems
Community Common Scripts Pack.#
This Script is part of theSupported 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 DataName | Description |
---|---|
Script Type | python3 |
Tags | transformer, list |
#
InputsArgument Name | Description |
---|---|
value |
#
OutputsThere are no outputs for this script.