【发布时间】:2021-12-29 18:22:21
【问题描述】:
作为输入,我有一个对象数组。我需要遍历它并显示如下所示的表格:
const arr = [
{
name: 'home/',
children: [
{
name: 'test1',
children: [
{
name: 'test3',
children: []
}
]
},
{
name: 'test2',
children: []
}
]
}
]
| | test1 | test3 |
| home | | |
| | test2 | |
【问题讨论】:
-
欢迎来到 Stack Overflow!这是一个用于询问需要特定答案的技术问题的网站,而不是让人们为您编写代码。
标签: javascript html loops