$startsWith

Filter records where a column’s value starts with a specified prefix. The $startsWith method is used for matching entries that begin with a given string, making it ideal for filtering based on the beginning of text fields.

await Member.$search({
    $where: {
        username: {
            $startsWith: 'bes'
        }
    }
});

Last updated