Reputation: 191
var error = new Object ({'1a':'1','1b':'1','2a':'1'}); // like this I have defined around 200 values
if (some condition is true)
error[id] = 0; // id is selected dynamically ( '1a' or '1b' or what ever)
when all this is done I want to check if any one in Object error still have value '1' or not. I have used the following but it does not seem to work..
for ( i in error)
if(error[i].value == '1') -some code- // this line gives error, not able to read value
what should be the correct method...??
Upvotes: 0
Views: 635