FortiSOAR Knowledge Base
FortiSOAR: Security Orchestration and Response software provides innovative case management, automation, and orchestration. It pulls together all of an organization's tools, helps unify operations, and reduce alert fatigue, context switching, and the mean time to respond to incidents.
Anonymous
Not applicable
Article Id 193354
Description

{

    "data": {

        "values": [ "value1", "value2" ]

    }

}


When accessing an element of a dict data as {{data[values]}} or {{data.values}} it expect to get the corresponding value as a result, but it throws error <built-in method values of dict object at 0x7f0a12b79af8>.


To get corresponding value in such case use .get() as below


{{data.get('values')}}


OUTPUT:


['value1', 'value2']


Comments
rrighi
Staff
Staff

Thank you very much Andy! That helped me a lot! I was fighting against jinja dictionaries and arrays. The method get you mentioned was the solution.

Contributors