title: Loop through nested objects with jQuery
body: <p>Hey everyone I am trying t find the most dynamic way to loop through an array and return specific values return specific values... The json is deeply structured and may change, could there be a $.each() formula that can help?</p>
  
  <p>Example:</p>
  
  <pre><code>var myobj = {
      obj1: { key1: 'val1', key2: 'val2' },
      obj2: { key1: '2val1', 
             key2: { nest1: 'val1', nest2: 'val2', nest3: 'val3' }, 
             key3: { nest1: 'K3val1', nest2: 'K3val2', 
                   nest3: [
                           { nest1: 'val1', nest2: 'val2', nest3: 'val3' }, 
                           { nest1: 'val1', nest2: 'val2', nest3: 'val3' }
                          ]
                   }
            },
      obj3: { key1: 'dddddval1', key2: 'val2' }
      }
  </code></pre>
  
  <p>now lets say i want to retrieve "<code>K3val2</code>" value but instead of hardcoding it like so: <code>myobj.obj2.key3.nest2</code> is there a dynamic way I do this with <code>$.each()</code> mybe?</p>