Unable to parse Webresponse

Rees_ Ian
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.
January 31, 2024

I am making a Web Request call from Jira Automation which is successful.  I can't access the WebResponse fields with dot notation because it is not in JSON format. So I want to parse the WebResponse body to get access to certain fields.  But I am finding that basic string functions on the body are not returning anything.

e.g. I log {{webResponse.body}} and can see lots of text in the body but if I log say {{webResponse.body.left(5)}}, I get an empty string.  Any help appreciatedwebresponse1.PNGwebresponse2.PNG

2 answers

1 accepted

0 votes
Answer accepted
Rees_ Ian
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.
January 31, 2024

I've been able to answer this myself. Answer was to go further in the dot notation and use webResponse.body.result and then I could access my desired field by dot notation e.g. webResponse.body.result.number

Madar_ Andrew
Contributor
July 23, 2024

I am working on something similar but having issues parsing a response body.  The response contains 8 areas.  I want to parse all eight.  Are you saying to use webResponse.body.result.number such as webResponse.body.result.1, webResponse.body.result.2, webResponse.body.result.3, etc....?

 

 

0 votes
Nodar Vardiashvili
Contributor
August 6, 2024

any news here ?

Madar_ Andrew
Contributor
August 8, 2024

I figured it out.  I will post a reply with details shortly.

Like # people like this
Harish Gunturu November 26, 2024

Hello @Madar_ Andrew , could you please post your results with examples?

I am trying to capture the remote links

 

Thanks!

Suggest an answer

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

Atlassian Community Events