Json access error
<pre><code>var markers3 = [];
for (var i = 0; i &lt; 1964; i++) {
    var dataPhoto = data8.weblandmarks8[i];
    if(data8.weblandmarks8[i].ip2==data8.weblandmarks8[i+1].ip2 )
            {
            var k=i+2;
            while(1)
                {
                if((data8.weblandmarks8[k].ip2) == (data8.weblandmarks8[i].ip2))
                k++;
                else break;
                }   

            for (var j = i; j &lt; k; j++)
                {
                var latLng = new google.maps.LatLng(data8.weblandmarks8[j].latitude,data8.weblandmarks8[j].longitude);
                var marker = new google.maps.Marker({position: latLng,icon: webicon,title:data8.weblandmarks8[j].webaddress}); 
                markers3.push(marker);  
                }   

            i=k-1;
            }

    }
</code></pre>

<p>google maps application
I get the following error in firefox </p>

<pre>
Error: data8.weblandmarks8[k] is undefined
Source File: file:///Applications/MAMP/htdocs/geo/js/myscript.js
Line: 140
</pre>

<p>I have defined <code>K</code> but why does firefox say that the json data accessed with it is undefined?
the same data can be accessed with <code>i</code> variable.</p>

<p>edit:
I have a json data file which I am accessing by
    
its working
but the error is with that specific line only</p>
