[英]Special Characters in JSON object
So I'm trying to access a JSON callback that looks like所以我试图访问一个看起来像的 JSON 回调
{
"response": {
"data": {
"@data": {
"property": "value"
"property": "value"
}
}
}
and keep getting errors in vscode when trying to access the @data object.并在尝试访问@data object 时不断在 vscode 中出错。
I've tried我试过了
response.data[@data]
as well adjusting special characters in the config file and a replace function for @以及调整配置文件中的特殊字符并将 function 替换为 @
I think you just have to put quotes around @data我认为您只需要在@data 周围加上引号
like this:像这样:
response.data['@data']
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.