Forums

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

Listing values found in an Automation Smart Value

Stephen Holt
Contributor
October 13, 2023

I have a web request that the smart variable in automation {{webResponse.body}} returns a list of values that look like this:

{
  "apps": [
    {
      "name": "Google"
    },
    {
      "name": "Adobe"
    }

I'm trying to list just the values of the array like
Google
Adobe

{{webresponse.body.apps.get(0).name}}
shows us the first name in the array, but I can't seem to find any wildcard or iterate through the list options.


2 answers

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 Leaders.
October 13, 2023

Hi @Stephen Holt 

It looks like you figured out using a list iterator to get the values.  Did you want to do something different than what you are showing?

Kind regards,
Bill

0 votes
Stephen Holt
Contributor
October 13, 2023

The closest I can get is adding 2 new lines

{{#webresponse.body.apps}}{{name}}

{{/}}

resulting in 

Google
Adobe

Suggest an answer

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

Atlassian Community Events