Recursively remove empty values (null, undefined, '', [], {}) from object or array
Value to clean
Cleaned value or null if result is empty
removeEmpty({ a: 1, b: null, c: { d: [], e: 'hello' } })// => { a: 1, c: { e: 'hello' } } Copy
removeEmpty({ a: 1, b: null, c: { d: [], e: 'hello' } })// => { a: 1, c: { e: 'hello' } }
Recursively remove empty values (null, undefined, '', [], {}) from object or array