[
{
"id": "1",
"title": "1234",
"owner": "10000",
"children": [
{
"id": "2",
"title": "651651",
"owner": "10000"
},
{
"id": "8",
"title": "111",
"owner": "10000",
"children": [
{
"id": "3",
"title": "123456789",
"owner": "10000"
}
]
},
{
"id": "1",
"title": "智能插座",
"owner": "651651",
"cid": "1"
}
]
},
{
"id": "4",
"title": "651651651",
"owner": "10000",
"children": [
{
"id": "3",
"title": "651",
"owner": "651651",
"cid": "4"
}
]
},
{
"id": "5",
"title": "6465465",
"owner": "10000",
"children": [
{
"id": "2",
"title": "651",
"owner": "651",
"cid": "5"
}
]
},
{
"id": "6",
"title": "444",
"owner": "10000"
}
]用tree_to_list方法操作后的数据结构[
{
"id": "1",
"title": "1234",
"owner": "10000"
},
{
"id": "1",
"title": "智能插座",
"owner": "651651",
"cid": "1"
},
{
"id": "2",
"title": "651651",
"owner": "10000"
},
{
"id": "2",
"title": "651",
"owner": "651",
"cid": "5"
},
{
"id": "3",
"title": "123456789",
"owner": "10000"
},
{
"id": "3",
"title": "651",
"owner": "651651",
"cid": "4"
},
{
"id": "4",
"title": "651651651",
"owner": "10000"
},
{
"id": "5",
"title": "6465465",
"owner": "10000"
},
{
"id": "6",
"title": "444",
"owner": "10000"
},
{
"id": "8",
"title": "111",
"owner": "10000"
}
]求一个树变无限级数组的方法啊 最佳答案