132
rated 0 times
[
136]
[
4]
/ answers: 1 / hits: 61410
/ 9 Years ago, thu, march 26, 2015, 12:00:00
Is there some elegant way of filtering out falsey properties from this object with lodash/underscore? Similar to how _.compact(array)
removes falsey elements from arrays
so from
{
propA: true,
propB: true,
propC: false,
propD: true,
}
returning
{
propA: true,
propB: true,
propD: true,
}
More From » underscore.js