I have this array:
[null, {name:\'John\'}, null, {name:\'Jane\'}]
I want to remove the null values. Is there an easy way to do this with unders
From underscore documentation
without_.without(array, *values) Returns a copy of the array with all instances of the values removed.
So just use this method
var a = [null, {name:'John'}, null, {name:'Jane'}] a = _.without(a, null);