title: Remove specific properties from all objects in parent/child-relationship of arbitrary depth
body: <p>I have a JavaScript object that represents a parent-child relationship of arbitrary depth. How can I remove certain properties for ALL objects?</p>
  
  <pre><code>var persons = [{
      name: 'hans',
      age: 25,
      idontwantthis: {
        somevalue: '123'
      },
      children: [{
          name: 'hans sohn',
          age: 8,
          idontwantthiseither: {
              somevalue: '456'
          },
          children: [{
              name: 'hans enkel',
              age: 2,
              children: []
          }]
      }]
  }];
  </code></pre>
  
  <p>I only want the properties <strong>name</strong>, <strong>age</strong> and <strong>children</strong> and get rid of all the others. The new Array should look like this:</p>
  
  <pre><code>var persons = [{
      name: 'hans',
      age: 25,
      children: [{
          name: 'hans sohn',
          age: 8,
          children: [{
              name: 'hans enkel',
              age: 2,
              children: []
          }]
      }]
  }];
  </code></pre>