I saw this and this topics, but not solved my problem.
Here is my code what is working fine in Chrome
and Firefox
, but in Internet Explorer
not working (tested only in IE8):
var myjson = {'dat':[
{'myval':'100','price':'1300'},
{'myval':'100','price':'950'},
{'myval':'20','price':'100'},
{'myval':'0','price':'1000'},
{'myval':'100','price':'750'},
]};
var myotherval = 0;
for (var i = 0; i < myjson.dat.length; i++) {
if ( (myjson.dat[i].myval == 0 || myjson.dat[i].myval == 0) && myotherval == 0 ) {
// do something
}
}
The Internet Explorer say is NULL, or not an object
. Every variable has value every time. Several times they are 0
.
Anybody has any idea? Where can I find the error?