<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic When Output array of dictionaries from code block, receiving this error in Splunk SOAR</title>
    <link>https://community.splunk.com/t5/Splunk-SOAR/When-Output-array-of-dictionaries-from-code-block-receiving-this/m-p/590121#M808</link>
    <description>&lt;P&gt;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.&lt;/P&gt;
&lt;P&gt;Value of the output variable:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="java"&gt;[
    {
        "tags": [
            "tag1"
        ],
        "domain": "example1.com"
    },
    {
        "tags": [
            "tag2"
        ],
        "domain": "example2.com"
    }
]&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Data Paths:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="javascript"&gt;Working:
function_name:custom_function:result_domains

Not Working:
function_name:custom_function:result_domains.*.domain&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The not working selection throws the following error:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="python"&gt;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 "&amp;lt;playbook&amp;gt;", line 93, in get_url_calltrace_callback
  File "&amp;lt;playbook&amp;gt;", line 399, in domains
  File "&amp;lt;playbook&amp;gt;", 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)&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Is this a known limitation of the code block (not custom function) in Splunk SOAR?&lt;/P&gt;</description>
    <pubDate>Tue, 22 Mar 2022 09:05:41 GMT</pubDate>
    <dc:creator>Benni</dc:creator>
    <dc:date>2022-03-22T09:05:41Z</dc:date>
    <item>
      <title>When Output array of dictionaries from code block, receiving this error</title>
      <link>https://community.splunk.com/t5/Splunk-SOAR/When-Output-array-of-dictionaries-from-code-block-receiving-this/m-p/590121#M808</link>
      <description>&lt;P&gt;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.&lt;/P&gt;
&lt;P&gt;Value of the output variable:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="java"&gt;[
    {
        "tags": [
            "tag1"
        ],
        "domain": "example1.com"
    },
    {
        "tags": [
            "tag2"
        ],
        "domain": "example2.com"
    }
]&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Data Paths:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="javascript"&gt;Working:
function_name:custom_function:result_domains

Not Working:
function_name:custom_function:result_domains.*.domain&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The not working selection throws the following error:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="python"&gt;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 "&amp;lt;playbook&amp;gt;", line 93, in get_url_calltrace_callback
  File "&amp;lt;playbook&amp;gt;", line 399, in domains
  File "&amp;lt;playbook&amp;gt;", 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)&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Is this a known limitation of the code block (not custom function) in Splunk SOAR?&lt;/P&gt;</description>
      <pubDate>Tue, 22 Mar 2022 09:05:41 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-SOAR/When-Output-array-of-dictionaries-from-code-block-receiving-this/m-p/590121#M808</guid>
      <dc:creator>Benni</dc:creator>
      <dc:date>2022-03-22T09:05:41Z</dc:date>
    </item>
  </channel>
</rss>

