【发布时间】:2020-12-05 03:08:56
【问题描述】:
我有一个 Angular 项目和一个嵌套的 json 文件,如下所示: 我想要“这个 json 数据必须从 json 文件中导入,并且必须使用该 json 对象加载树视图。我该怎么做?
{
"?xml": {
"@version": "1.0",
"@encoding": "utf-8"
},
"root": {
"@title": "Basic Rules",
"topic": [
{
"@id": "1",
"@title": "Beginning",
},
{
"@id": "2",
"@title": "Purpose of Course",
},
{
"@id": "3",
"@title": "Basic Lessons",
"topic": [
{
"@id": "4",
"@title": "Lesson Content",
}
]
}
]
}
}
【问题讨论】:
标签: json angular tree treeview