Forums

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

JSON parsing format?

Marcus_Dyer June 30, 2020 edited

So I successfully have authenticated everything and am in the process of parsing the JSON to put it in cells  but my issue is I am only able to do "key" and "ID". How do I parse the other JSON data? 

 

1 answer

0 votes
Michael Raj July 30, 2020 edited

Hi @Marcus_Dyer ,

it depends on how do you request issues - by "search" or directly by "issue".

Search URL: [...].com/rest/api/latest/search?jql=[...]
Issue URL: [...].com/rest/api/latest/issue/[...]

If "search", I use something like this:

Sheets("issues").Cells(Sheet_Row, 9) = Json("issues")(Json_Item)("fields")("status")("name")

If "issue" there is only one item so the code would like this:

Sheets("issues").Cells(Sheet_Row, 9) = Json("issues")("fields")("status")("name")

Of course you have to have default "fields" setting or set "fields=status"

You can always check the hierarchy in Firefox - it shows nice formatted JSON responses.

 

I've focused on "status" but other fields can be done in similar way. Always check the parent and child nodes in nicely formatted JSON for example in Firefox. It helps a lot!

 

Best,
Michael

Suggest an answer

Log in or Sign up to answer
TAGS
atlassian, team '25 europe, atlassian event, barcelona 2025, jira, confluence, atlassian intelligence, rovo, ai-powered collaboration, developer tools, agile teams, digital transformation, teamwork solutions, atlassian conference, product announcements

🌆 Team '25 Europe registration is now open!

Join the largest European gathering of the Atlassian Community and reimagine what’s possible when great teams and transformative technology come together. Plus, grab your Super Fan ticket now and save over €1,000 on your pass before prices rise on 3 June.

Register now
AUG Leaders

Atlassian Community Events