Hey all,
So I am pulling in JSON data and I am able to create a JSONItem from it OK. Here would be some JSON:
{
"expand":"schema,names",
"startAt":0,
"maxResults":1000,
"total":3,
"issues":[
{
"expand":"operations,editmeta,changelog,transitions,renderedFields",
"id":"11111",
"self":"https://jira.thewebsite.com/rest/api/latest/issue/11111",
"key":"PROJ-001",
"fields":{
"summary":"This would be another summary 1"
}
},
{
"expand":"operations,editmeta,changelog,transitions,renderedFields",
"id":"22222",
"self":"https://jira.thewebsite.com/rest/api/latest/issue/22222",
"key":"PROJ-002",
"fields":{
"summary":"This would be another summary 2"
}
},
{
"expand":"operations,editmeta,changelog,transitions,renderedFields",
"id":"33333",
"self":"https://jira.thewebsite.com/rest/api/latest/issue/33333",
"key":"PROJ-003",
"fields":{
"summary":"This would be another summary 3"
}
}
]
}
I figured out to access the “top level” values, such as:
dim intTotalSubTasks as integer
intTotalSubTasks = jsonSubTasks.Value("total")
…but I can’t figure out how I can access the “issues” array, or further yet the “summary” listed in “fields” … I have tried various for loops that try to reference the values, but I am banging my head against a wall at this point!
Can anyone throw me a bone? I am having a hard time understanding how to “go down a level” to a sub-value (aka, down to “fields” inside “issues”, and then into “summary”)
I understand I will need a loop to put the data into an array/structure/class/dictionary/whatever, but I can’t get anything to work. I have looked at some search hits on the forum for JSON parsing, but I have more levels than those examples.
Thanks to anyone who can help!!