Splunk SOAR

When Output array of dictionaries from code block, receiving this error

Benni
Loves-to-Learn

When an array of dictionaries is assigned to the output variable of a code block, only the whole array can be used as input on the following blocks, but using a data path selector for key selection throws an error.

Value of the output variable:

 

[
    {
        "tags": [
            "tag1"
        ],
        "domain": "example1.com"
    },
    {
        "tags": [
            "tag2"
        ],
        "domain": "example2.com"
    }
]

 

Data Paths:

 

Working:
function_name:custom_function:result_domains

Not Working:
function_name:custom_function:result_domains.*.domain

 

The not working selection throws the following error:

 

Python Error: Traceback (most recent call last):
  File "../pylib/phantom/decided/internals.py", line 445, in call_playbook_action_callback
  File "../pylib/phantom/decided/internals.py", line 159, in invoke_callback_for_callable
  File "../pylib/phantom/decided/internals.py", line 268, in _invoke_callback_for_callable
  File "<playbook>", line 93, in get_url_calltrace_callback
  File "<playbook>", line 399, in domains
  File "<playbook>", line 499, in code_11
  File "/opt/phantom/usr/python36/lib/python3.6/json/__init__.py", line 354, in loads
    return _default_decoder.decode(s)
  File "/opt/phantom/usr/python36/lib/python3.6/json/decoder.py", line 339, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
  File "/opt/phantom/usr/python36/lib/python3.6/json/decoder.py", line 357, in raw_decode
    raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)

 

Is this a known limitation of the code block (not custom function) in Splunk SOAR?

Labels (2)
Tags (1)
0 Karma
Career Survey
First 500 qualified respondents will receive a $20 gift card! Tell us about your professional Splunk journey.
Get Updates on the Splunk Community!

.conf25 Global Broadcast: Don’t Miss a Moment

Hello Splunkers, .conf25 is only a click away.  Not able to make it to .conf25 in person? No worries, you can ...

Observe and Secure All Apps with Splunk

 Join Us for Our Next Tech Talk: Observe and Secure All Apps with SplunkAs organizations continue to innovate ...

What's New in Splunk Observability - August 2025

What's New We are excited to announce the latest enhancements to Splunk Observability Cloud as well as what is ...