I have an object whose keys can have have values which can be object, string or array.
const obj = {
key1: 'asdf',
key2: {},
key3: ['a','b','c'],
key4: [],
key5: '',
}
I have to filter all the keys which are empty i.e empty objects, empty array or empty string.
Is there any other way than writing conditions based on typeof of keys and then checking null ?