Returns the entries that match the provided filter.
Last updated 1 year ago
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
true
false
Returns
<>
Entries that match the filter
// 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 }]