Why doesn't this test pass?
it('lodash_test', function() {
var arr = [{a: "x", b: [{x: "1", y: "2"}]}, {a: "x", b: [{x: "1", y: "2"}]}, {a: "x", b: [{x: "33", y: "2"}]}]
var result = _.filter(arr, function(obj) {
obj.b.forEach(function(item_b) {
if(item_b.x=="1") {
return true;
}
});
});
expect(result).to.be.eql([{a: "x", b: [{x: "1", y: "2"}]}, {a: "x", b: [{x: "1", y: "2"}]}]);
});