You can use _.compact(array);
Creates an array with all falsey values removed. The values false, null, 0, “”, undefined, and NaN are falsey.
See: https://lodash.com/docs/4.15.0#compact
You can use _.compact(array);
Creates an array with all falsey values removed. The values false, null, 0, “”, undefined, and NaN are falsey.
See: https://lodash.com/docs/4.15.0#compact