const arr = [{title: 'test', id: 1, children: []}, {title: 'test1', id: 2, children: [{title: 'first children', id: 3}]}]
arr.splice(arr.indexOf(arr.find(el => el.id === id)),1);[{title: 'test', id: 1, children: []}][{title: 'test', id: 1, children: []}, {title: 'test1', id: 2, children: []}]