 <pre><code>function updateObject(object, newValue, path){ var stack = path.split('&gt;'); while(stack.length&gt;1){ object = object[stack.shift()]; } object[stack.shift()] = newValue; } </code></pre>