Closed Apexal closed 4 years ago
I am exploring MongoDB aggregations and turns out its exactly what we need for crowd-sourcing data.
We can use this aggregation to get all links for each (or a single) course:
[ { '$match': {} }, { '$unwind': { 'path': '$links', 'preserveNullAndEmptyArrays': false } }, { '$group': { '_id': '$summary', 'links': { '$addToSet': '$links' } } } ]
We can use this to suggest links for users when they add their courses.
Out of LATE's scope.
I am exploring MongoDB aggregations and turns out its exactly what we need for crowd-sourcing data.
We can use this aggregation to get all links for each (or a single) course:
We can use this to suggest links for users when they add their courses.