Removing brackets from JSON response in issue update automation

Kelly Wehbi
Contributor
February 2, 2023

Hi there, I'm creating an Automation in Jira to return values from an HTTP call, which will then update a field. The issue is being updated with the following value:

{{webResponse.body.Objects.FieldValues.Value}}

The response is coming back just fine and doing the update, but it's keeping the brackets [ ] in place from the array, so the field value looks like "[01830]".

How am I able to strip the brackets in the response?

Thanks!

1 answer

0 votes
Paul Heath Armengol
Contributor
February 11, 2023

Use the flatten() method.

{{webResponse.body.Objects.FieldValues.Value.flatten()}}

Leo Nolivaiko November 25, 2024

Thanks Paul. This worked for my use case. Jira Cloud.

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
STANDARD
PERMISSIONS LEVEL
Product Admin
TAGS
AUG Leaders

Atlassian Community Events