Skip to content

Instantly share code, notes, and snippets.

View gowthamrodda's full-sized avatar
🏠
Working from home

rgkmarc gowthamrodda

🏠
Working from home
  • Hyderabad, India
View GitHub Profile
@cthurston
cthurston / mongodb-facet-combine.js
Created November 3, 2017 14:21
MongoDb combine $facet results into a single result set.
db.getCollection('list').aggregate([
{
$facet: {
"events":[{
$match: {
'type': 'Event'
}
}],
"tasks": [{
$match: {