Is there a way in underscore to filter properties in an object if the values are numbers? I've seen this question, but it deals with booleans.
I want to filter object properties with values greater than one.
From:
[{
"Tom" : 10,
"Dick" : 5,
"Harry": 0,
"date" : "02/23/2010
}]
To:
[{
"Tom" : 10,
"Dick" : 5,
"date" : "02/23/2010
}]
I've looked at the underscore documentation and thought _.pick
or _.omit
would do the trick, but they only focus on keys.
I've also tried _.filter
with _.values
as the argument.