I am trying to get the example for conditional observables to work below:
fruits = Observable(
{ name: 'Apple' , color: 'red' },
{ name: 'Lemon' , color: 'yellow' },
{ name: 'Pear' , color: 'green' },
{ name: 'Banana', color: 'yellow' });
goodFruits = fruits.where({color: 'yellow'});
console.log('Good fruits from object: ' + JSON.stringify(goodFruits));
goodFruits = fruits.where(function(e){
return e.color === 'yellow';
});
console.log('Good fruits from function: ' + JSON.stringify(goodFruits));
But the output from the monitor is:
LOG: Good fruits from object: {"_subscribers":[],"_isLeaf":false,"_values":[]}
LOG: Good fruits from function: {"_subscribers":[],"_isLeaf":false,"_values":[]}
I was expecting something to be in the values for the resulting observable. Is this a bug?