.getMany()
Returns the entries that match the provided filter.
getMany(filter)
Parameter
Description
filter
Function to test each element of the array. Return a value that coerces to true
to keep the element, or to false
otherwise
// Note: Users is a collection.
Users.createBulk([
{ name: 'Peter', age: 20 },
{ name: 'Henry', age: 18 },
{ name: 'John', age: 15 }
]);
Users.getMany(user => user.age > 18); // [{ name: 'Peter', age: 20 }, { name: 'Henry', age: 18 }]
Last updated
Was this helpful?