如何在 javascript 中递归循环 json 对象数据键。
请检查以下 json 对象:
{
"data":[
{
"label": "Test-1",
"data": "Test-1",
"updated_at": "2020-3-23",
"created_at": "2020-3-19",
"expanded": true,
"children": [
{
"label": "Test-1.1",
"data": "Test-1.1",
"updated_at": "2020-3-19",
"created_at": "2020-3-19",
"expanded": true,
"children": [
{
"label": "Test-1.1.1",
"updated_at": "2020-3-19",
"created_at": "2020-3-19",
"expanded": true,
"children": [
{
"label": "Test-1.1.1.1",
"data": "Test-1.1.1.1",
"updated_at": "2020-3-19",
"created_at": "2020-3-19",
"expanded": true
}
]
},
{
"label": "Test-1.1.2",
"data": "Test-1.1.2",
"updated_at": "2020-3-19",
"created_at": "2020-3-19",
"expanded": true
},
{
"label": "Test-1.1.3",
"data": "Test-1.1.3",
"updated_at": "2020-3-19",
"created_at": "2020-3-19",
"expanded": true
}
]
}
]
精慕HU
相关分类