如何获取json对象中的特定值?

{

    "id": "some",

    "title": "some",

    "author": {

        "name": "\u95eb\u9759"

    },

    "link": [{

        "@attributes": {

            "href": "http://localhost/",

            "rel": "some"

        }

    },

    {

        "@attributes": {

            "href": "http://localhost/",

            "rel": "some"

        }

    },

    {

        "@attributes": {

            "href": "http://localhost/",

            "rel": "some"

        }

    }]

}

如上,对于服务器返回的json数据,如何获取Link中第一个@attributes的href值?


慕桂英546537
浏览 2002回答 3
3回答
打开App,查看更多内容
随时随地看视频慕课网APP

相关分类

JavaScript