I have an object like so:
var obj = { thing_1 : false,
thing_2 : false,
thing_3 : true,
thing_4 : false,
thing_5 : true
}
I am now looping through this object and searching for the object keys that are true, like so:
for (value in obj){
if (obj[value] === true ){
// do something
}
}
How do I know when I have reached the last loop pass where one of the keys is true?