when deleting data is selected, the selected data id forms an array, and then deletes the data from the first layer of all data arrays, and if the data has this data in the children,children, delete the data from the first layer
data = [{
] flg: "0",
id: "1001",
name: "1",
children: [{
flg: "0",
id: "100101",
name: "1"
}, {
flg: "0",
id: "100102",
name: "2"
}, {
flg: "0",
id: "100103",
name: "3"
}]
}, {
flg: "0",
id: "100101",
name: "1"
}, {
flg: "0",
id: "100102",
name: "2"
}, {
flg: "0",
id: "100103",
name: "3"
}]
cacel = ["100103"]
the data to be obtained is
[{
flg: "0",
id: "100101",
name: "1"
}, {
flg: "0",
id: "100102",
name: "2"
}]