I have a nested object, I want to loop through a particular property and check if true exists.
If true isn't found I want to return false, otherwise if there is one instance of true I want to stop the loop.
let object = {
firstProperty: 'foo',
secondProperty: 'bar',
objectProperty: {
value1: false,
value2: false,
value3: true
}
I only want to loop through the objectProperty, and return true if true is found, and false if true is NOT found