Database

[{"_id":ObjectId("5f25916e771c501cf1c040be"),"instrument":"AUD_USD","granularity":"D","candles":[{"complete":true,"volume":5,"time":"2009-12-31T22:00:00.000000000Z","ask":{"o":"0.89815","h":"0.89850","l":"0.89800","c":"0.89825"}},{"complete":true,"volume":330,"time":"2010-01-02T22:00:00.000000000Z","ask":{"o":"0.89820","h":"0.89944","l":"0.89725","c":"0.89881"}},{"complete":true,"volume":15449,"time":"2010-01-03T22:00:00.000000000Z","ask":{"o":"0.89885","h":"0.91376","l":"0.89398","c":"0.91278"}},{"complete":true,"volume":17119,"time":"2010-01-04T22:00:00.000000000Z","ask":{"o":"0.91282","h":"0.91751","l":"0.90936","c":"0.91196"}},{"complete":true,"volume":16740,"time":"2010-01-05T22:00:00.000000000Z","ask":{"o":"0.91188","h":"0.92180","l":"0.90998","c":"0.91984"}},{"complete":true,"volume":18321,"time":"2010-01-06T22:00:00.000000000Z","ask":{"o":"0.91972","h":"0.92676","l":"0.91605","c":"0.91753"}},{"complete":true,"volume":18262,"time":"2010-01-07T22:00:00.000000000Z","ask":{"o":"0.91765","h":"0.92582","l":"0.91243","c":"0.92521"}},{"complete":true,"volume":1,"time":"2010-01-08T22:00:00.000000000Z","ask":{"o":"0.92521","h":"0.92521","l":"0.92521","c":"0.92521"}}]}]

Query

db.collection.aggregate({$addFields:{candles:{$filter:{input:"$candles",as:"candle",cond:{$and:[{$gte:[{$toDate:"$$candle.time"},{$toDate:"2010-01-02"}]},]}}}}})

Result