Retriving elements of the object from an array of objects
<p>I have the array NatArray and the object NatObj ,This object I am pushing to 
 the former array ,but while retrieving its getting the last entry only ,
 Here is my code </p>

<pre><code>var tArray = [];
var tObj ;
tObj = {};
tObj.TranslatedLocIpAddr = 202116107;
tObj.TranslatedLocPort = 123;
tObj.LocIp = 50529027;
tObj.LocPort = 324;
tObj.LocPortRange = 5;
count = 0;
tArray.push(tObj) ;  

tObj.TranslatedLocIpAddr = 202116108;
tObj.TranslatedLocPort = 130;
tObj.LocIp = 67372036;
tObj.LocPort = 324;
tObj.LocPortRange = 5;
count = 1;
tArray.push(tObj) ;  

for (var i = 0; i &lt;= count ;i++) {
    if( (tArray[i].TranslatedLocIpAddr == tGlobalIp)
     &amp;&amp; (tArray[i].TranslatedLocPort == tGlobalPort) ) {
        alert("Existing t entry"); 
        return false;
    } 
}
</code></pre>

<p>I have verified the <code>tArray[i].TranslatedLocIpAddr</code> value, every time its 
retrieving the last value in the array only.</p>
