I have an array of objects
const arrayOfObjects = [{firstKey: '', secondKey: 'someValue', thirdkey: 'someValue', fourthKey: ''},{firstKey: '', secondKey: '', thirdkey: 'someValue', fourthKey: ''}];
I need to return an array of keys that are empty in all of the objects in the array. So for the above example, it would return ['firstKey', 'fourthKey'] but not 'secondKey', because it is only empty in one of the objects.
I have found a lot of examples (like one below) that return boolean but having trouble finding a way to return the actual empty keys. Thanks
const isEmpty = Object.values(object).every(x => (x === ''));