title: Remove empty objects from an object
body: <p>I am trying to remove empty objects inside an object, here is an example with the expected output:</p>
  
  <pre><code>var object = {
      a: {
          b: 1,
          c: {
              a: 1,
              d: {},
              e: {
                f: {} 
              }
          }
      },
      b: {}
  }
  
  
  var expectedResult = {
      a: {
          b: 1,
          c: {
              a: 1,
          }
      }
  }
  </code></pre>
  
  <p>I tried using some examples from other StackOverflow questions, however those are just for one level objects.</p>