I'm trying to retrieve all of my charts data with a query on date attribute but it returns all of charts data and not good results.
Model
charts: [
{
date: {
type: Date,
required: true,
},
},
],
My query
Model.findById({ _id: '5f47f7d65ff89941ecbc8340', 'charts.date': { $gte: '2020-01-15' } })
I want to retrieve all charts elements whose date is greater than '2020-01-15'.