Hello I am using mongoDB 3.4.0
and the query is:
db.collection.aggregate([
{"$project":{"_id": ObjectId("595c911093e2359c3af3fefb"),
"GROUP_count": { "$size": "$GROUPS" },
"SYSTEM_count": { "$size": "$IDUS" }
}
}])
But i an getting error "OperationFailure: exception: invalid operator '$size'"