GetValuesOfMultipleFields

The script receives a list of fields and a context key base path. For example, Key=Test.result List=username,user gets all of the values from Test.result.username and Test.result.user. The Get field of the task must have the value ${.=[]}.

python · Filters And Transformers

Details

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

README

The script receives a list of fields and a context key base path. For example, Key=${Test.result} List=username,user gets all of the values from Test.result.username and Test.result.user.
The Get field of the task must have the value ${.=[]}.

Script Data


Name Description
Script Type python3
Tags transformer
Cortex XSOAR Version 5.0.0

Inputs


Argument Name Description
key The JSON object under which to find the fields. For example ${Test.Results}.
list The list of fields to retrieve from context. The list can contain comma seperated values. For example key1,key1
value The value to set in context for the key.

Outputs


There are no outputs for this script.

args:
- name: key
  required: true
  description: The JSON object under which to find the fields. For example ${Test.Results}.
- name: list
  required: true
  description: The list of fields to retrieve from context. The list can contain comma seperated values. For example key1,key1.
  isArray: true
- name: value
  description: The value to set in context for the key.
commonfields:
  id: GetValuesOfMultipleFields
  version: -1
name: GetValuesOfMultipleFields
scripttarget: 0
subtype: python3
dockerimage: demisto/python3:3.12.13.10404775
runas: DBotWeakRole
script: '-'
tags:
- transformer
comment: |-
  The script receives a list of fields and a context key base path. For example, Key=Test.result List=username,user gets all of the values from Test.result.username and Test.result.user.
  The Get field of the task must have the value ${.=[]}.
enabled: true
timeout: '0'
isllm: false
type: python
fromversion: 5.0.0
tests:
- GetValuesOfMultipleFIelds Test