Skip to main content
Journey Uncommon Logo
JourneyUncommon
mediumMongoDB$lookup joinsSingle-choice MCQ

What does the `as` field contain for an `orders` document whose `customerId` matches *no* document in the `customers` collection?

db.orders.aggregate([ { $lookup: { from: 'customers', localField: 'customerId', foreignField: '_id', as: 'customer' } } ])