title: How to filter nested object using lodash
body: <p>I have an object, which looks like this:</p>
  
  <pre><code>{
      'somename1':{
          status:'success',
          data:{
              key:'value1',
              field2:'',
              field3:'',
              field4:'',
              field5:'',
              recordSts:'done',
          }
      },
      'someOtherName':{
          status:'success',
          data:{
              key:'value2',
              field2:0,
              field3:'',
              recordSts:'progress',
              field5:'',
              field6:0,
          }
      }
  }
  </code></pre>
  
  <p>In this object, I have two fields <code>key</code> and <code>recordSts</code>, which are <code>not null</code> if the status is <code>success</code>.</p>
  
  <p>I want to filter this object using lodash and the output should look like this</p>
  
  <pre><code>{
      'somename1':{
          status:'success',
          data:{
              key:'value1',
              status:'value1',
          }
      },
      'someOtherName':{
          status:'success',
          data:{
              key:'value1',
              status:'value1',
          }
      }
  }
  </code></pre>
  
  <p>Simply I want to delete the keys which having <code>null</code> or <code>empty</code> or <code>0</code> values.</p>
  
  <p>I tried this:</p>
  
  <pre><code>_.map(records, 'key'); //records contains my input object
  </code></pre>
  
  <p>But it gives only the value of one field, instead, I want the name of the field and the second field also. Please help.</p>
  
  <p>Thanks.</p>