I am using Underscore.js library in my application. I have an Object
{a:"1", b:"2", c: "3", d:"no", e: "no"}
I want to condense this object to have only the properties not having "no" attribute which should result in the below object
{a:"1", b:"2", c: "3"}
In Uderscore.js, I used the below code
_.omit(obj, 'attr');
But in the above code, instead of the 'attr', I need to have a function which will output the keys containing no values. Is there a better way to do this. Please let me know how to get the keys having 'no' values.
_.omit(obj, function(val) { return val === 'no'})