How to add variable int a chained call to object?
<p>If I have</p>

<pre><code>obj1.obj2.obj3
</code></pre>

<p>and I want to refer to any of them with a variable</p>

<pre><code>var x = obj2
</code></pre>

<p>how should i use it to call obj2, since <code>obj1.x.obj3</code> obviously doesn't work</p>
