ConvertToSingleElementArray

Converts a single string to an array of that string.

python · Filters And Transformers

Details

IDConvertToSingleElementArray
Languagepython
From Version5.0.0
Docker Imagedemisto/python3:3.12.13.10404775
Tagstransformer entirelist

README

Converts a single string to an array of that string.

Script Data


Name Description
Script Type python3
Tags transformer, entirelist
Cortex XSOAR Version 5.0.0

Inputs


Argument Name Description
value The string to convert to an array of that string.

Outputs


There are no outputs for this script.

import demistomock as demisto


def main():
    args = demisto.args()
    value = args.get("value")
    if value and isinstance(value, list):
        demisto.results(value)
    elif value:
        demisto.results([value])
    else:
        demisto.results([])


if __name__ in ("__main__", "__builtin__", "builtins"):
    main()