现在生成的arr数组的数据结构如下:
[
title: "否",
children: [
{title: "非以下重点职业人员", children:[{title: "陈建军", p: "否--非以下重点职业人员--"}]},
{title: "非以下重点职业人员", children: [{title: "阙臻毅", p: "否--非以下重点职业人员--"}]},
{title: "非以下重点职业人员", children: [{title: "杨华", p: "否--非以下重点职业人员--"}]},
{title: "非以下重点职业人员", children: [{title: "杨进杰", p: "否--非以下重点职业人员--"}]},
{title: "非以下重点职业人员", children: [{title: "杨俊涛", p: "否--非以下重点职业人员--"}]},
{title: "非以下重点职业人员", children: [{title: "杨陆", p: "否--非以下重点职业人员--"}]},
{title: "非以下重点职业人员", children: [{title: "杨胜栋", p: "否--非以下重点职业人员--"}]},
{title: "非以下重点职业人员", children: [{title: "杨玉文", p: "否--非以下重点职业人员--"}]},
{title: "非以下重点职业人员", children: [{title: "杨志", p: "否--非以下重点职业人员--"}]},
{title: "冷链食品从业人员", children: [{title: "陈冬立", p: "否--冷链食品从业人员--"}]}
]
],
[
title: "涉外",
children: [
{title: "进出口岸冷链货物人员", children: [{title: "伍红华", p: "涉外--进出口岸冷链货物人员--"}]}
]
],
[title: "涉疫",
children: [
{title: "非以下重点职业人员", children: [{title: "杨志刚", p: "涉疫--非以下重点职业人员--"}]}
]
]
但是我希望生成的arr数组是这个样的:
[
title: "否",
children: [
{title: "非以下重点职业人员", children:[
{title: "陈建军", p: "否--非以下重点职业人员--"},
{title: "阙臻毅", p: "否--非以下重点职业人员--"},
{title: "杨华", p: "否--非以下重点职业人员--"},
{title: "杨进杰", p: "否--非以下重点职业人员--"},
{title: "杨俊涛", p: "否--非以下重点职业人员--"},
{title: "杨陆", p: "否--非以下重点职业人员--"},
{title: "杨胜栋", p: "否--非以下重点职业人员--"},
{title: "杨玉文", p: "否--非以下重点职业人员--"},
{title: "杨志", p: "否--非以下重点职业人员--"},
{title: "陈冬立", p: "否--冷链食品从业人员--"}
]
}
]
],
[
title: "涉外",
children: [
{title: "进出口岸冷链货物人员", children: [{title: "伍红华", p: "涉外--进出口岸冷链货物人员--"}]}
]
],
[title: "涉疫",
children: [
{title: "非以下重点职业人员", children: [{title: "杨志刚", p: "涉疫--非以下重点职业人员--"}]}
]
]