在Json中读取嵌套项并在kendo UI中以树结构显示 [英] Reading nested items in Json and displaying in a tree structure in kendo UI
本文介绍了在Json中读取嵌套项并在kendo UI中以树结构显示的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
I have an API which returns Json in the below format. I need to read this Json and display the items in a tree structure in Kendo UI.
{
$id: "35"
name: "api.jobs.results.view"
category: "api.jobs.results"
}-
{
$id: "36"
name: "api.jobSchedules.aggregateReadRates.cancel"
category: "api.jobSchedules.aggregateReadRates"
}
For the above JSON, the UI should be created in the below way in kendo UI dynamically.
API ---jobSchedules --------aggregateReadRates -------------------Cancel
Can anyone please help.
推荐答案
id: 35
name: api.jobs.results.view
类别: api.jobs.results
} -
{
id: "35" name: "api.jobs.results.view" category: "api.jobs.results" }- {
id: 36
name: api.jobSchedules.aggregateReadRates.cancel
类别: api.jobSchedules.aggregateReadRates
}
对于上述JSON,应在中以 在剑道UI中动态创建UI。
API --- jobSchedules -------- aggregateReadRates -------------------取消
任何人都可以帮忙。
id: "36" name: "api.jobSchedules.aggregateReadRates.cancel" category: "api.jobSchedules.aggregateReadRates" } For the above JSON, the UI should be created in the below way in kendo UI dynamically. API ---jobSchedules --------aggregateReadRates -------------------Cancel Can anyone please help.
Kendo UI的TreeView可以很容易地绑定到多级JSON - 您只需要遵循文档中的指南......
请参阅此演示以了解如何构建JSON数据: http:/ /demos.telerik.com/kendo-ui/treeview/local-data-binding [ ^ ]
Kendo UI's TreeView can be bounded to multi-level JSON easily - you only have to follow the guides in the documentation...
See this demo to understand how to built your JSON data: http://demos.telerik.com/kendo-ui/treeview/local-data-binding[^]
这篇关于在Json中读取嵌套项并在kendo UI中以树结构显示的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文