console.log says object is undefined when I call any of its members
<p><strong>The Environment</strong></p>

<p>Mozilla Firefox 11  Running MAMP and testing on localhost</p>

<p><strong>The Error</strong></p>

<p>dirObject[data] is undefined<br>
h t t p : / / localhost:8888/framework/<br>
Line 34</p>

<p><b>The Symptom</b> </p>

<p>console.log(<strong>object</strong>[<em>member</em>]); produces expected results (returns the <strong>object</strong>), but  console.log(<strong>object</strong>[<em>member</em>][<em>member</em>]); returns that <strong>object</strong> is undefined.</p>

<p><strong>dirObject</strong></p>

<pre><code>var dirObject ={
    'directoryName' : {
            directory : 'path/to/the/directory',
            txt       : 'textFileInDirectory.js',
            css       : 'styleSheetFileInDirectory.css',
            js        : 'javaScriptFileInDirectory.js'
    }... // There are currently 27 of these structures in my object.
}
</code></pre>

<p><strong>My Code</strong></p>

<pre><code>for(var count = 0; count &lt;= size; count++){
    var data = keys[count];
    console.log(dirObject[data]['directory']);
}
</code></pre>

<p>-- Returns 'dirObject is undefined' and references the console.logs line number.</p>

<pre><code>for(var count = 0; count &lt;= size; count++){
    var data = keys[count];
    console.log(dirObject[data]);
}
</code></pre>

<p>-- Returns the multi-dimensional object (Contains root link paths and file names for items listed in my plugins directory.  The object exists).</p>

<p>I'm sure this is something dirt simple, and I'm just not get it.   Can someone explain what I'm missing, or point in a good direction to figure this stuff out.</p>

<p>Thanks in advanced</p>

<p>Cix</p>
