Mongodb – Mongoose: find document and trim array elements that don't match with the condition
i have documents like this : { "_id": { "$oid": "630656bfc64b4c94c5c5a614" }, "collectionId": { "$oid": "630654a37a2a8ea9e11b6803" }, "__v": 0, "createdAt": { "$date": { "$numberLong": "1661359804637" } }, "stats": [ { "floor": 0.005, "volume": 3.288569999999999, "listedCount": 57, "timestamp": { "$date": {…