JoinIfSingleElementOnly

Return the single element in case the array has only 1 element in it, otherwise return the whole array.

python · Filters And Transformers

Details

IDJoinIfSingleElementOnly
Languagepython
From Version5.0.0
Docker Imagedemisto/python3:3.12.13.10404775
Tagsentirelist transformer general

README

Returns the single element in a situation where an array has only 1 element in it, otherwise return the whole array.

Script Data


Name Description
Script Type python
Tags entirelist, transformer, general

Inputs


Argument Name Description
value The array to join if it has a single element.

Outputs


There are no outputs for this script.

commonfields:
  id: JoinIfSingleElementOnly
  version: -1
name: JoinIfSingleElementOnly
script: ''
type: python
subtype: python3
tags:
- entirelist
- transformer
- general
comment: Return the single element in case the array has only 1 element in it, otherwise return the whole array.
enabled: true
args:
- name: value
  required: true
  default: true
  description: The array to join if it has single element.
  isArray: true
scripttarget: 0
isllm: false
fromversion: 5.0.0
dockerimage: demisto/python3:3.12.13.10404775
tests:
- No tests (auto formatted)