remove falsy value from object in JavaScript using lodash4

remove falsy value

lodash4

_.pickBy({ a: null, b: 1, c: undefined }, _.identity);

// {b: 1}

Resource

Subscribe to flynn's devnote

Don’t miss out on the latest issues. Sign up now to get access to the library of members-only issues.
jamie@example.com
Subscribe