$or

Filter records that match at least one of the specified conditions. The $or method is used to combine multiple conditions, retrieving entries that satisfy any of the given criteria, making it useful for flexible queries.

await Member.$search({
    $where: {
        username: {
            $or: [
                { age: { $ne: 13 }  },
                { isPremium: true }
            ]
        }
    }
});

Last updated