How create vlans if he don't exist in the file gathred by ios_facts

Hello,

I want to create (configurate) “vlan” in my device (switch) when it is not available on my equipment

for configurate or ( add) vlan in the switch I use the module “ios_vlans”

for gather facts of my device I use “ios_facts”

you will find below how are stored all the vlans currently available on my equipment

`

“ansible_network_resources”: {
“vlans”: [
{
“mtu”: 1500,
“name”: “default”,
“shutdown”: “disabled”,
“state”: “active”,
“vlan_id”: 1
},
{
“mtu”: 1500,
“name”: “V2-SPA-LAN-A-Admin”,
“shutdown”: “disabled”,
“state”: “active”,
“vlan_id”: 2
},
{
“mtu”: 1500,
“name”: “VLAN0010”,
“shutdown”: “disabled”,
“state”: “active”,
“vlan_id”: 10
},
{
“mtu”: 1500,
“name”: “Total”,
“shutdown”: “disabled”,
“state”: “active”,
“vlan_id”: 20
},
{
“mtu”: 1500,
“name”: “youpi”,
“shutdown”: “disabled”,
“state”: “active”,
“vlan_id”: 222
}

`

I’m trying to find of way of how doing it thanks to when conditionnal in ansible but can’t find it.
Thanks for you help