【发布时间】:2018-01-15 19:13:53
【问题描述】:
我想在我的代码中解析一个嵌套的 json,但我在 json 建模方面遇到了困难,请帮助我获取以下 json。
{ "label": {
"Application": {
"_default": {
"defaultIcon": "",
"defaultRank": 1,
"defaultLabel": "Name",
"defaultColor": "#ffffff",
"displayName": "Application"
}
}}
【问题讨论】:
-
将您的代码添加到您要解析的位置
-
label[Application]._default[displayName] m 使用上面的代码,但 m 收到错误,即 _default 未定义
-
您的问题无法理解。你想“建模”什么? “解析”是什么意思?你需要帮助做什么?这与 Angular 或 Angular 模板有什么关系?
标签: json angular angular2-template