Hi @Ouissal_KADRI and @Paul_Sujith_Rayi ,
As of MongoDB 3.6, you can use “$expr” in your find queries.
Please note that “$expr” allows the use of aggregation expressions within the query language.
Since you can use “$gt” by providing an array that contains a constant value and a document to calculate the length of the array by using the “$size” operator, it will be very easy for you to filter out the appropriate documents from the collection.
I hope it helps .
In case you have any doubts, please feel free to reach out to us.
Curriculum Services Engineer