I want to loop through a dynamic object, match the value, if item matched, jump out of the loop...
Let say have an object:{a:false:b:true,c:false}
I want to do something like (with loadash),
_.fowOwn({a:1,b:2}, function (value, key) {
console.log(key);
if(value); break;
});
So this should log (a & b)
.
How can I break
when the item is matched ?
Thanks for any help.