advice about "with_dict" and condicional correct way to use

Hi all,

I has this error:

`
UndefinedError: ‘dict’ object has no attribute ‘JMSFileStoreName’

`

Into my dict just a few has this attributes, others not, I’ll like to execute some task in case that this atribute exist, some way to check the status to avoid break the playbook?

This is my task:

`

  • stat: path=“/tmp/{{ item.key }}{{ server.sufix }}_{{item.value.JMSFileStoreName}}.py”
    register: config_jms
    with_dict: “{{AppName}}”
    when: “{{item.value.JMSFileStoreName}} is defined”
    tags: config_jms
    `

thanks for any advice!
Ale

no moustaches in when and no chained defined using dot notation (.).

when: "'JMSFileStoreName' in item.value"