Uh sorry, I gave the wrong example. This is the correct example:
const result = await Expense.find({ 'category.name': { $regex: ".*ood.*", $options: 'i' } }).populate<{
category: CategoryType
}>("category");
console.log("Result: ", result)
My apologies ![]()