I have an object with this kind of structure.
const object = {
property1: null,
property2: {
array1: [],
array2: []
},
property3: {
prop1: null,
prop2: null
}
}
I need to check every property in object or each value in each property and if it is falsy - null, or empty array then do someting with it. Otherwise just leave it.
I'm not sure how to do it considering some properties have nested properties etc.
All help will be much appreciated.