isArrayItemInList

This automation is for comparing array(list) data of context to existing lists on XSOAR server. You can avoid using loop of sub-playbook. inputArray: the context array/list data listName: the XSOAR system list.

python · Community Common Scripts

Details

IDisArrayItemInList
Languagepython
From Version6.0.0
Docker Imagedemisto/python3:3.12.13.11879924
TagsCondition

README

This automation is for comparing array(list) data of context to existing lists on XSOAR server. You can avoid using loop of sub-playbook.
inputArray: the context array/list data
listName: the XSOAR system list

Script Data


Name Description
Script Type python3
Tags Condition

Inputs


Argument Name Description
inputArray the context list data. Data type is list.
listName the XSOAR system list name.

Outputs


There are no outputs for this script.

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

array = demisto.args().get("inputArray")
list_name = demisto.args().get("listName")

res = demisto.executeCommand("getList", {"listName": list_name})[0]

for item in array:
    if str(item) in res["Contents"]:
        demisto.results("yes")
        break