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

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root


1 badge earned


Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!


Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.


Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!


Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
Community Members
Community Events
Community Groups

How to parse a json array response in script Runner

serge calderara
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.
May 20, 2020

Dear all,

From script runner script we are using MS Graph APi to get information from particular user mentionned in an issue.

For that we call an API endpoint using HttpBuilder and from the response json we get the follwing output :

 value=[{         businessPhones=[], 
         displayName=Serge Cal GMAIL, 
         jobTitle=null, , 
         surname=null,,          id=253bca1d-6c03-441f-92e4-e206c7d180f7

The method sample I use is as below :

def http = new HTTPBuilder('')
http.request(GET) {

requestContentType = ContentType.JSON
uri.query = [ $filter:"mail eq '$userEmail'".toString() ]

headers.'Authorization' = "Bearer " + AuthToken

response.success = { resp, json ->
_userId=json["value"]["id"]  <<<= Do not work !!!!!


How can I access the value of value[0].Id member from the response delegate ?

Thanks for help




1 answer

1 accepted

0 votes
Answer accepted
Peter-Dave Sheehan
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
May 23, 2020

I was able to find what seems to be the reference for that API

So I think either of the following 2 notations will work:

_userId = 
_userId = json['id']

Suggest an answer

Log in or Sign up to answer
AUG Leaders

Atlassian Community Events