Given a Javascript object
x = {'a': 123, 'b': 'hello', 'c': NaN, 'd': null, 'e': undefined}
Is it possible to remove all properties that has NaN, null, or undefined using Lodash, or without Lodash but in a similarly readable way?
Tried
_.omitBy(x, _.isNil)
but it did not remove NaN
{a: 123, b: "hello", c: NaN}
Can _.omitBy take multiple parameters in addition to _.isNil?