1
我應該如何訪問這個JSON中的「遊戲」數組?我正在使用http://aspjson.com的課程。訪問ASP JSON:多維JSON數組
{
"period":[
{
"period_id":"1774",
"start_time_epoch":1431126300,
"games":[
{
"home_team":"WSH",
"away_team":"ATL"
}
]
}
]
}
方法:
today = date
For Each key In oJSON.data("period")
Set this = oJSON.data("period").item(key)
periodID = this.item("period_id")
periodDate = FormatDateTime(DateAdd("s", this.item("start_time_epoch"), "01/01/1970 00:00:00"),2)
----Ideally, this.item("games").item("home_team") would have worked.----
if cstr(today) = periodDate then
response.write periodID & " - " & periodDate & "<br/> - " & this.item("games").item("start_time")
end if
Next
謝謝。我在問題中的JSON被簡化了。 – localhost