title: JavaScript nested properties
body: <p>If I have an object with nested properties. Is there a function that will search all properties, and the properties with values that are other objects (which also have their own properties) and so forth?</p>
  
  <p>Example object: </p>
  
  <pre><code>const user = { 
      id: 101, 
      email: 'help@stack.com', 
      info: { 
          name: 'Please', 
          address: {
              state: 'WX' 
          }
      }
  }
  </code></pre>
  
  <p>In the object above is there a way I could simply call something like</p>
  
  <pre><code>console.log(findProp(user, 'state'));
  console.log(findProp(user, 'id'));
  </code></pre>