Collection.filter()

Syntax

collection.filter(filter)

Parameters

filter: Functionfunction (value) { return true/false; }

Return Value

This Collection instance (this)

Remarks

This method is identical to Collection.and()

Sample

db.friends.orderBy('age').filter(function (friend) {
    return friend.name === "Foo";
});

Table of Contents