【发布时间】:2019-07-03 20:38:40
【问题描述】:
我有一个嵌套的 json 对象,它表示父节点与其子节点之间的一对多关系。我想将此 json 表示为 HTML 中的组织结构图。我发现我可以使用 Google Charts 来做到这一点,但我不确定 Google Charts 是否让您能够设计盒子或对设计进行任何修改。
有人知道我可以学习的任何资源吗?
这是我构造的json对象:
{ 'id': 1,
'name': 'Parent Node',
'description': 'First Parent Node',
'children': [
{
'id': 2,
'name': 'child1',
'description': 'child1',
'children': [
{
'id': 4,
'name': 'grand1',
'description': 'grand1',
'children': []
}]
},
{
'id': 3,
'name': 'child2',
'description': 'child2',
'children': []
}]
}
这个问题Representing Binary Tree Structure in Web browser也类似,但是链接好像失效了。
【问题讨论】:
-
嗨,到目前为止,您尝试了什么?
-
@GalAbra 我什么都没尝试,因为我不知道从哪里开始。我正在寻求任何我可以学习的资源来帮助我开始。
-
我只是在 Google 上搜索了你的问题 :)
标签: html json hierarchical-data