Mongodb. Method to limit subdocuments that only have the given fields of the `projection` (that is, filter)?
By : Sienny
Date : March 29 2020, 07:55 AM
wish help you to fix your issue I believe that empty fields are returned in this case because document is an array and Mongodb does not want to change the array index of any elements. You can get an array of subdocuments with the aggregation framework: