filterBy (dependentKey, propertyKey, value) Ember.ComputedProperty
public
Filters the array by the property and value
let Hamster = Ember.Object.extend({ remainingChores: Ember.computed.filterBy('chores', 'done', false) }); let hamster = Hamster.create({ chores: [ { name: 'cook', done: true }, { name: 'clean', done: true }, { name: 'write more unit tests', done: false } ] }); hamster.get('remainingChores'); // [{ name: 'write more unit tests', done: false }]
Parameters:
-
dependentKey
String
-
propertyKey
String
-
value
*
Returns:
-
Ember.ComputedProperty
- the filtered array
Please login to continue.