Cant access object via variable?
<p>I have a javascript object defined as follows:</p>

<pre><code>var tabs = {
    'nav_tweet_search':'tweet-panel',
    'nav_shopping_cart':'cart-panel',
    'nav_stats':'stats-panel'
};
</code></pre>

<p>Im trying to access some values using a variable in another function. However, i am getting <code>undefined</code>. I created some console logs .. </p>

<pre><code>console.log("panel: "+panel);
console.log("tabs: "+tabs);
console.log("tabs.panel: "+tabs.panel);
</code></pre>

<p>Which outputs, </p>

<pre><code>panel: nav_tweet_search 
tabs: [object Object] 
tabs.panel: undefined
</code></pre>

<p>Any reason why i wouldnt be able to access the obj using a variable? If i do "tabs.nav_tweet_search" it works </p>
