0

我正在尝试使用此代码从以下 Json 文件中获取场地名称。但我得到 Object does not support this property or method: 'Info.Response.venues.items.venue' 错误。我会感谢你的帮助。

编辑:忘了提,我使用 ASP Xtreme Evolution 来解析 Json 数据。

<%
i = 0
    For Each key in Info.response.venues.items.keys()
        i = i + 1   
        For Each venue In Info.response.venues.items
            Response.write venue.Get("name")
        Next
    Next
    Response.Write "<br />" & i
%>

{
response: {

venues: {
    count: 27
    items: [
        {
            beenHere: 1
            venue: {
                id: "4227a500f964a520c51f1fe3"
                name: "Columbia University"
                : { }
                location: {
                    address:
                    crossStreet: "Broadway To Amsterdam Ave."
                    lat: 40.80821992957681
                    lng: -73.96215395358303
                    postalCode: "10027"
                    city: "New York"
                    state: "NY"
                    country: "United States"
                }
                categories: [
                    {
                        id: "4bf58dd8d48988d1ae941735"
                        name: "University"
                        pluralName: "Universities"
                        shortName: "University"
                        icon: {
                            prefix: "https://foursquare.com/img/categories/education/default_"
                            sizes: [
                                32
                                44
                                64
                                88
                                256
                            ]
                            name: ".png"
                        }
                        primary: true
                    }
                ]
                verified: true
                stats: {
                    checkinsCount: 14833
                    usersCount: 6138
                    tipCount: 52
                }
                beenHere: {
                    count: 0
                }
            }
        }
        {
            beenHere: 1
            venue: {
                id: "43bba61df964a520eb2c1fe3"
                name: "Whole Foods"
                contact: {
                    phone: "+12126735388"
                    formattedPhone: "+1 212-673-5388"
                    twitter: "WholeFoodsNYC"
                }
                location: {
                    address: "4 Union Square"
                    crossStreet: "btwn Broadway & University Pl."
                    lat: 40.734852286139734
                    lng: -73.99108529090881
                    postalCode: "10003"
                    city: "New York"
                    state: "NY"
                    country: "United States"
                }
                categories: [
                    {
                        id: "4bf58dd8d48988d118951735"
                        name: "Grocery or Supermarket"
                        pluralName: "Grocery or Supermarkets"
                        shortName: "Grocery Store"
                        icon: {
                            prefix: "https://foursquare.com/img/categories/shops/food_grocery_"
                            sizes: [
                                32
                                44
                                64
                                88
                                256
                            ]
                            name: ".png"
                        }
                        primary: true
                    }
                ]
                verified: true
                stats: {
                    checkinsCount: 43014
                    usersCount: 17275
                    tipCount: 212
                }
                url: "http://wholefoodsmarket.com"
                beenHere: {
                    count: 0
                }
            }
        }
}
4

0 回答 0