title: Change all keys in array also deeper inside object with array
body: <p>Currently for our navigation structure we have the following array:</p>
  <pre><code> {
    childNodes: [
     {title: &quot;Mijn afdeling&quot;, type: &quot;Department&quot;, relativeUri: &quot;/mijnafdeling&quot;},
     {title: &quot;contact&quot;, type: &quot;Department&quot;, relativeUri: &quot;/contact&quot;}
    ]
    RelativeUri: '/',
    title: 'test'
   },
  {
    childNodes: null
    RelativeUri: '/',
    title: 'test'
   }
  ]
  </code></pre>
  <p>Now I want to change all the 'childNodes' keys to 'child' and also all the relativeUri keys to href.</p>
  <p>My desired result should be</p>
  <pre><code> {
    child: [
     {title: &quot;Mijn afdeling&quot;, type: &quot;Department&quot;, href: &quot;/mijnafdeling&quot;},
     {title: &quot;contact&quot;, type: &quot;Department&quot;, href: &quot;/contact&quot;}
    ]
    href: '/',
    title: 'test'
   },
  {
    child: null
    href: '/',
    title: 'test'
   }
  ]
  </code></pre>
  <p>I know that I can do something like <code>this.navigationArray = this.navigationArray.map(({ childNodes, relativeUri }) =&gt; ({ childNodes: child, href: relativeUri }))</code> However I don't know how to get all the keys in the array under the childNodes object too. So it basically needs to 'find' or loop over all the objects inside the array, and find the specic keys. Also a 'childNodes' object can be null.</p>
  <p>For different pages I have a different number of navigation items, so I rather don't target a specific index as that can mess up the navigation.</p>
  <p>Thanks a lot!</p>