【发布时间】:2022-01-09 07:16:16
【问题描述】:
let data = {
"@type": "Movie",
"url": "/title/tt0443272/",
"name": "Lincoln",
"image": "https://m.media-amazon.com/images/M/MV5BMTQzNzczMDUyNV5BMl5BanBnXkFtZTcwNjM2ODEzOA@@._V1_.jpg",
"description": "As the American Civil War continues to rage, America's president struggles with continuing carnage on the battlefield as he fights with many inside his own cabinet on the decision to emancipate the slaves.",
"duration": "PT2H30M"
}
console.log(data.@type)
我有来自 scrping 的大量 json 数据,但我不知道如何获取其数据的价值 键从“@”开始
我如何获得@type 的值
当我使用这种方法时,我得到了错误:-
SyntaxError: 无效或意外的令牌
【问题讨论】:
-
试试
data["@type"]
标签: javascript json