Created on 06-04-2020 09:33 AM
{
"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']
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.
The Fortinet Security Fabric brings together the concepts of convergence and consolidation to provide comprehensive cybersecurity protection for all users, devices, and applications and across all network edges.
Copyright 2025 Fortinet, Inc. All Rights Reserved.