title: Setting a depth in an object literal by a string of dot notation?
body: <p>There are plenty of solutions out there to check/access an object literal giving a string of dot notation, but what I need to do is SET an object literal based on a string of dot notation. It is very technical why I need to do this, and if it isn't feasible I will come up with a different solution.</p>
  
  <p>Here is what I'd like to do:</p>
  
  <pre><code>var obj = { 
     'a': 1, 
     'b': 2, 
      'c': { 
        'nest': true 
      } 
  };
  </code></pre>
  
  <p>I'd like a function that would work something like this:</p>
  
  <pre><code>setDepth(obj, 'c.nest', false);
  </code></pre>
  
  <p>That would change the obj to this:</p>
  
  <pre><code>var obj = { 
     'a': 1, 
     'b': 2, 
      'c': { 
        'nest': false
      } 
  };
  </code></pre>
  
  <p>I've been trying to an hour and haven't been able to come up with a good solution yet. Another help would be so greatly appreciated!</p>