Group by month is giving error

db.getCollection("Issues").aggregate(
    [
        {
            "$project": {
               "zipdate" : {$month: "$zipfile.zip_file_dt_tm"},
            }
        },
        {
            $group: { 
               _id:  "$zipdate" ,
               totalPrice :  { $sum: 1 }
                
            }
        }
    ]
);

If I run the above query. it is giving me the below error.

{
	"message" : "can't convert from BSON type string to Date",
	"ok" : 0,
	"code" : 16006,
	"codeName" : "Location16006",
	"name" : "MongoError"
}

Here is collection details.

{
	"_id" : ObjectId("5f68a350621f37798e5523f4"),
	"issue_type" : "CH",
	"zipfile" : [
		{
			"zip_file_dt_tm_utc" : "2019-08-08 12:08:52",
			"zip_file_dt_tm" : "2019-08-08"
		}
	]
}

The error is because zipfile is an array. The data expression used with $month must be a valid expression that resolves to a Date, a Timestamp, or an ObjectID. See https://docs.mongodb.com/manual/reference/operator/aggregation/month/. You’ll have to $unwind the array and convert to date using $dateFromString.