Details
Description
When using the $function in the aggregation pipeline, you get an error stating that the "Stage must be a properly formatted document" even though executing the same pipeline in the Mongo shell works without error.
When using the $function in the aggregation pipeline, you get an error stating that the "Stage must be a properly formatted document" even though executing the same pipeline in the Mongo shell works without error.