I have an object like this:
var obj = { thing_1 : false, thing_2 : false, thing_3 : true, thing_4 : false, thing_5 : true }
Now I go through this object and look for the key of the object that is true, for example:
for (value in obj){ if (obj[value] === true ){
How do I know when I reached the last byte of the loop where one of the keys is true?
source share