1
我需要访问名称包含短划线的JSON数据,什么是最佳解决方案?删除短划线或只是处理该问题 这是我从简单节点服务器收回的JSON数据。如何在Angular2中使用破折号来访问JSON数据?
[{
"id": "xxxxxxxxxxxxx",
"type": "container",
"path": "/",
"dctitle": "xxxx",
"dc-creator": "xxxx",
"dc-description": "xxxx.",
"dcrights": "xxxx",
"hero-region": {
"hero-headline": "xxxxxxxxxxxx",
"hero-headline-sub": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
}
}]
在此先感谢!
'的console.log(数据[0] [ “英雄区域”] [ “英雄标题”])' – cartant