After get the pipeline, use like this (collection customer) db.customer.aggregate([{"$project": {“name”:1}}])