Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Fetch the last element of array in HTTP Response in Butler

gustavo_diel August 30, 2021

According to https://help.trello.com/article/1203-issuing-http-requests-with-butler we can fetch a resource. Is there a way to fetch the last element of an array? Say we have this:

data = [
{
field: 1
},
{
field: 2
}
]

and I want to fetch the last element (field: 2), is there a way without hardcoding the index? Something like

{httpresponse.data[-1].field}

 

1 answer

0 votes
Garrett
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
September 8, 2021

Hey @gustavo_diel 

Currently, fetching an array value like that is not possible, but I have let the team know about your interest in that.

For now, only index and "dot" field access is supported. Let me know if you have any more questions.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events