Thank you for replying. Actually I finally got it working. But … now that i have your attention I’m also having troubles in Lab Using Cursor-like Stages. I realize I can’t post code but the problem is in my $project stage, I get the following:
Mongo Server error (MongoCommandException): Command failed with error 16410 (Location16410): 'Invalid project :: caused by :: FieldPath field names may not start with '‘.’ on server cluster0-shard-00-00-jxeqq.mongodb.net:27017.
I’ve tried multiple combinations of this, for ex. $num_Favs, “$num_Favs”, num_Favs, “num_Favs”. Same thing with the ‘cast’ array. I assume ’ FieldPath field names ’ are referring to names in doc (I realize num_favs isn’t in doc) and not aggregation expressions. I’ve of course googled but again no luck. Any ideas?