Is there a way to filter this array to only include objects with truthy values for keys? For example, here is an array:
[
{ foo: NaN, test: 'String' },
{ foo: 2, test: '' },
{ foo: 3, test: 'Something' },
]
I want to create a new array that excludes objects with falsy values for keys. So, in this case, the new array should only contain the third object:
[
{ foo: 3, test: 'Something' },
]