I am trying to pull data from 2 arrays (date and price time series) above a certain date cutoff oldest using pymongo.
date_price_collection.aggregate([
{ '$match': { 'ticker': ticker } },
{
'$project': {
'dates': { '$gte': ['dates', oldest] },
#prices to match these dates
},
},
],
);
The way data is organized is there are 2 arrays, one for dates and one for prices of the same length. How can I pull prices as well that correspond to dates > oldest?
Thank you very much for any advice!