ansible uri and body format

Here are my body’s model

{
“specs”: [
{
“name”: “test”,
“id”: “7dcf2db8-858e-4c00-bbde-e0c5c734770c”
}
]
}

trying to convert this last for uri module
body_format: json
body:

specs:
id: “{{ item.0.uuid }}”
name: “{{ item.2 }}”

how to convert this last correctly ? switch to raw ?

You want:

body_format: json
body:
specs:

  • id: “{{ item.0.uuid }}”
    name: “{{ item.2 }}”

thanks a lot