Question: i've got array like this. Unlimited number of nesting possible

```
const myArray = [
  {
   id: 1, 
   children: [
              { 
                id: 3,
                children: []
              }
             ]
  },
  {
   id: 2, children: []
  }
]

```

Please, help me to remove any object by id and return new array without it.

Answer: 
```
function removeFromArrayOfObj (array, idToRemove) {
  for (const [i, e] of array.entries()) {
    if (e.id === idToRemove) {
     array.splice(i, 1)
     continue
    }
   if (e.children) {
     removeFromArrayOfObj(e.children, idToRemove)
    }
 }
 return array
}

```
Ah, homework problems.

* write 'kill\_entries\_with\_id(child\_array, id\_to\_kill)'. For each element of the child array, it should `del` the element if its id matches. Otherwise, it should recursively call itself with the element's children.
* Note that you should walk the array backwards by index so you don't have to worry about deleting elements mucking up your loop. Consider `list(range(10,-1,-1)`