StringToArray

Converts string to array. For example: `http://example.com/?score:1,4,time:55` will be transformed to `["http://example.com/?score:1,4,time:55"]`.

python · Filters And Transformers

Source

import demistomock as demisto  # noqa: F401
from CommonServerPython import *  # noqa: F401


def main(args):
    value = args.get("value")
    json_value = [value]
    return json.dumps(json_value)


if __name__ in ("__main__", "__builtin__", "builtins"):
    try:
        return_results(main(demisto.args()))
    except Exception as exc:
        return_error(str(exc), error=exc)

README

Converts string to array.
For example: http://example.com/?score:1,4,time:55 will be transformed to ["http://example.com/?score:1,4,time:55"].

Script Data


Name Description
Script Type python3
Tags transformer
Cortex XSOAR Version 6.0.0

Inputs


Argument Name Description
value The URL to transform.

Script Example

!StringToArray value="http://example.com/?score:1,4,time:55"

Human Readable Output

["http://example.com/?score:1,4,time:55"]