Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Iterating through a JSON unnamed Array API response using JIRA Automation Smart Values

Cord Corcese
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
December 3, 2025

Hi there, 

I am exploring the JIRA automation platform to figure out its capabilities for future projects, integrating our HR software to pull data into JIRA automatically. I am however stuck trying to parse a JSON array of arbitrary that takes the form of 

``` [ {ID: Value, ID2: value2}, {ID: Value, ID2: Value2} ] ```

As a JSON array, there is no field name for the array itself, so I am a bit tripped up figuring out how to access its data using smart values. The format of this JSON response cannot be changed. 

I am attempting to use a for each loop using the smart value {{webResponse.body}}, however this has not worked. Logging the outcome of this for each loop, it just passes the entire JSON object without splitting it into multiple objects. I have attempted to use {{JSONStringtoObject(webResponse.body)}} which also did not work, and prevents the log action from returning anything readable. 

I assume I'm missing something simple about how Jira Smart Values work here, especially since I am able to parse/iterate through the same JSON without issue in JavaScript, so any help would be appreciated, thank you!

1 answer

0 votes
Bill Sheboy
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Champions.
December 3, 2025

Hi @Cord Corcese -- Welcome to the Atlassian Community!

Without seeing your entire rule and parsing of the message for context...

It appears the webResponse is plain text, and because the array does not have a name, the jsonStringToObject() function is not succeeding with the conversion.

You could try a couple of approaches:

  • Extract the plain text from the response to a Created Variable, insert a name for the array using text functions, and then try converting to JSON with the function before iterating, either inline or in the longer-format 
  • Use the match() function with a regular expression, or the split() function (perhaps on the right-curly bracket) to convert to a list, and then iterate and extract the values with text functions

 

Kind regards,
Bill

Suggest an answer

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

Atlassian Community Events