Hi,
I was wondering if I could get some help in combining two JSONArrays into one for a PUT request in my automation. I have fetched some data from my URL using a webhook. I have stored the JsonArray to a variable. I want to combine the fetched array with an issue field and update it using a new webhook URL.
I would like to:
{{webhookResponse.attendees}} combined with {{issue.email}}
The {{webhookResponse.attendees}} is a JsonArray and the {{issue.email}} is a string to be added into the JsonArray
For Example:
Two Arrays.
[
{
"productcode":"IRECP",
"FreeStock":"5",
"ExpectedStock":""
},
{
"productcode":"N10001",
"FreeStock":"0",
"ExpectedStock":""
}
]
[
{
"productcode":"EK20",
"FreeStock":"1.00",
"ExpectedStock":"20.00"
},
{
"productcode":"EL50",
"FreeStock":"-8.00",
"ExpectedStock":"299.00"
}
]
Desired Result would be one array containing both arrays.
[
{
"productcode":"IRE10030CP",
"FreeStock":"5",
"ExpectedStock":""
},
{
"productcode":"NIK10001",
"FreeStock":"0",
"ExpectedStock":""
},
{
"productcode":"EK219SV150",
"FreeStock":"1.00",
"ExpectedStock":"20.00"
},
{
"productcode":"ELTHMC50",
"FreeStock":"-8.00",
"ExpectedStock":"299.00"
}
]
Thanks
Hi @Blen Assefa -- Welcome to the Atlassian Community!
I do not know of any built-in JSON array merging for automation, but I expect you could use the text (string) and list functions to perform the merge. Please look here for more information:
Best regards,
Bill
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.