Skip to main content

CreateArrayWithDuplicates

This Script is part of the Community Common Scripts Pack.#

Supported versions

Supported Cortex XSOAR versions: 6.0.0 and later.

Will create an array object in context from a given string input , allowing for duplicate values to be retained

Output is to ContextKey.array as JSON does not permit duplicate key names

e.g., ContextKey.array.value1, ContextKey.array.value2, ContextKey.array.value3, etc.

Script Data#


NameDescription
Script Typepython3
TagsUtility

Inputs#


Argument NameDescription
arrayDataThis is the array data to create array from, should be in the format of comma separator by default: val1,val2,val3
separatorSeparator to use to split arrayData, by default will be comma ',' .
contextKeyThe key to place result array in context, by default will be "array".

Outputs#


There are no outputs for this script.