Hey,
I’m trying to sort the queries by date but it is not working as it gives me an error
useEffect(async () => {
const pipeline = { sort : { updatedAt : 1 } }
return data.aggregate(pipeline)
const results = JSON.stringify(x, null, 2)
const finalResult = JSON.parse(results)
setResults(finalResult)
}, [])