Hi,
I am new to using Jira automations, and I am trying to use a Webhook-triggered automation rule to populate custom fields of a sub-task using the json sent through.
Each json sends a list of dictionaries (within "results") and I need to:
For each dictionary, populate the custom fields using the attributes list of dictionaries as highlighted in bold the example below:
payload = {
"event": "xxx",
"checkResults": [
{
"id": "xxx",
"name": "xxx",
"attributes": [
{
"id": "xxx"
"name": "xxx"
"label": "xxx"
"value": ["value1"]
},
{
"id": "yyy"
"name": "yyy"
"label": "yyy"
"value": ["true"]
},
{
"id": "yyy"
"name": "yyy"
"label": "yyy"
"value": ["true"]
}
],
"outcome": "pass"
},
{
<<<<<dict no. 2>>>>
}
}So far, my rule creates a smart value called "checkResult" which represents each dictionary within the "checkResults" list shown above (assume dict no. 2 is the same as the first one).

Here is a look into the Create Subtask action:
So currently I am using .get(0) and .get(1) to get attributes xxx and yyy. I was wondering if I could use some sort of logic like custom_field_x = "value" where "name" = "xxx". However, I cannot nest another loop within the "For each checkResult list item" branch.
Please let me know if I need to provide further explanation 😅 Many thanks in advance!