I need to find if item exist in deep nested array.

**Example :**

```
let arr = [
  {
   id: 1 ,
   title : 'Test' ,
   children: 
  [
    {id: 1 , title: 'Title' , hasChild : true },
    {id: 1 , title: 'Title' , hasChild : false },
    {id: 1 , title: 'Title' },
  ] 
 },
]

```

I need to looping thought `arr.children` and trying to find if it has a property with name **hasChild** find item and set it on false.

After looping I need to get an array like **:**

```
let arr = [
  {
   id: 1 ,
   title : 'Test' ,
   children: 
  [
    {id: 1 , title: 'Title' , hasChild : false }, //here is changed hasChild to false
    {id: 1 , title: 'Title' , hasChild : false },
    {id: 1 , title: 'Title' },
  ] 
 },
]

```

I am find way but i need better solution :

```
    arr.map(it) => {
      if (it.hasChild) {
        it.dashCheck = false; 
      }
    });

```