Ansible work with array

Hi Everyone,

Hear is some part of my ansible code, I want to take severety from Json array when contactAccount is someemail2@somedomain.com, but I got following error:

FAILED! => {“failed”: true, “msg”: “‘thresholds’ is undefined”}

I tried to change {{ thresholds }} to {{ array.customRules.thresholds }} or {{ item.0.customRules.thresholds }} , but again got errors, could anyone help me?

**- name: create files shell: echo "{{ item.1.**severity }}" >> /opt/testing
with_subelements: - “{{ array }}” - “{{ thresholds }}”

Hear is array example:

[
{
“contactAccount”: “someemail1@somedomain.com”,“hasWarning”: false,“customRules”: {“thresholds”: [{“severity”: “3”,“monitorId”: “1234”,},{“severity”: “4”,“monitorId”: “2345”}
]}
},

{
“contactAccount”: “someemail2@somedomain.com”,“hasWarning”: false,“customRules”: {“thresholds”: [{“severity”: “30”,“monitorId”: “16234”,},{“severity”: “7”,“monitorId”: “23845”}
]}
},

. . .

{
“contactAccount”: “someemail100@somedomain.com”,“hasWarning”: false,“customRules”: {“thresholds”: [{“severity”: “4”,“monitorId”: “1734”,},{“severity”: “46”,“monitorId”: “2845”}
]}
}

]