title: How to convert a string containing dots to a property accessor in javascript?
body: <p>For example, if I have a string:</p>
  
  <pre><code>    var foo = 'a.b.c';
  </code></pre>
  
  <p>... and Object:</p>
  
  <pre><code>    var bar = {
          a: {
              b: {
                 c: null
              }
           }
      }
  </code></pre>
  
  <p>How can I use the string to set the value of 'c' to 'Hello World!"?</p>