所以我正在向 JIRA API 发出一个休息请求,并得到一个包含所有对象的 json 响应。
我的请求如下所示:
Set restReq = CreateObject("MSXML2.ServerXMLHTTP.3.0")
restReq.open "GET", "URI",False
restReq.setRequestHeader "Authorization","Basic{user:Password}"
restReq.setOption SXH_OPTION_IGNORE_SERVER_SSL_CERT_ERROR_FLAGS,SXH_SERVER_CERT_IGNORE_ALL_SERVER_ERRORS
restReq.send("")
'response.write(restReq.responseText)
response.write 看起来像这样(但更长):
[{"self":"https://JIRA:8343/rest/api/2/project/CT","id":"10004","key":"CT","name":"Core Technologies"}},
{"self":"https://JIRA:8343/rest/api/2/project/CTCCG","id":"10006","key":"CTCCG","name":"CT CCG"}}]
我希望能够遍历响应并在无序列表中使用“id”、“key”和“name”。我可以创建一个 ul,但是如何从 json 中提取我需要的信息?