Alternative to eval
<p>In the following statement, how could I make the "<code>log.entries[i]</code>" part a variable?</p>

<pre><code>json.log.entries[i]
</code></pre>

<p><a href="https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/eval" rel="nofollow"><code>eval</code></a> works but I don’t want to use it.</p>

<pre><code>eval("json" + "var")
</code></pre>

<p>I also tried:</p>

<pre><code>json[var]
</code></pre>

<p>Thanks</p>
