_DATA.forEach( (value, index) =>{
const children = [];
value.child.forEach( (value2, index2) =>{
children.push({
title:value2.name,
id:value2.id,
key:0-${index}-${index2}
,
selectable: true
})
})
DATA2.push({
id:value.id,
title:value.name,
children:children,
key:0-${index}
,
selectable: true
})
});
_DATA.forEach((value, index) => {
DATA2.push({
id: value.id,
title: value.name,
children: value.child.map((value2, index2)=>({
title: value2.name,
id: value2.id,
key: `0-${index}-${index2}`,
selectable: true
})),
key: `0-${index}`,
selectable: true
})
});