Looping through JSON Array using ASPJSON

后端 未结 1 629
春和景丽
春和景丽 2021-01-26 11:28

Thanks to advice from here (Looping through JSON using ASPJSON) and here (ASP JSON: Object not a collection), I am starting with a JSON array in Classic ASP:

{\"         


        
相关标签:
1条回答
  • 2021-01-26 11:45

    You could access msg, which is a json object, within the loop you already have:

    For Each thingy In oJSON.data("markers")
    
        Set this = oJSON.data("markers").item(thingy)
        Response.Write _
        this.item("_id") & ": " & _
        this.item("ts") & "<br>" &_
        this.item("msg").item("subject") & ": "  &_
        this.item("msg").item("diag") & "<br>"
    
    Next
    
    0 讨论(0)
提交回复
热议问题