title: Reaching into object from array in javascript?
body: <p>How can I reach into a object using an array and set a value - preferably without using eval, doing something like <code>object[eval(["key", "deepkey"].split("")) = "newvalue"</code>?</p>
  
  <p>Doing it manually, I would just do <code>object.key.deepkey = "newvalue"</code>, but again, I need to do this using an array to reach into the right property.</p>
  
  <p>The object for reference:</p>
  
  <pre><code>object = {
    key: {
      deepKey: "value"
    }
  }
  </code></pre>