title: Filter an object by partial paths
body: <p>How to filter an object given its partial path?</p>
  
  <p>As an example. </p>
  
  <pre><code>let address  = {
    country :{
      name:'Japan',
      city:{
        name:'Tokyo',
        town: {
          name:'korushawa'
        }
      },
      code:'JP'
    },
    nearbyCountry:'Korea'
  }
  </code></pre>
  
  <p><strong>path1: <em>countr.cit</em></strong></p>
  
  <p>For <code>address</code>, <strong>path1 will result in</strong> </p>
  
  <pre><code>{
    country :{
      city:{
        name:'Tokyo',
        town: {
          name:'korushawa'
        }
      }
    }
  }
  </code></pre>
  
  <p><hr>
  <strong>path2: countr</strong></p>
  
  <p>For path2,
  I should get entire <code>address</code> object because <em>countr</em> is present in <code>country</code> and <code>nearbyCountry</code></p>
  
  <pre><code>{
    country :{
      name:'Japan',
      city:{
        name:'Tokyo',
        town: {
          name:'korushawa'
        }
      }
    },
    nearbyCountry:'Korea'
  }
  </code></pre>
  
  <p>Edit: I have been able to solve this when given an exact path (ex: <code>country.city</code>). But having difficulty with partial paths.</p>