Skip to content

Instantly share code, notes, and snippets.

View shekharmayank's full-sized avatar
💻
hacking away

Mayank Shekhar shekharmayank

💻
hacking away
View GitHub Profile
@shekharmayank
shekharmayank / solution.js
Created January 5, 2018 17:26
learnyoumongo Coding Challenges Solutions
//Solution 9
const url = 'mongodb://localhost:27017/learnyoumongo';
const mongo = require('mongodb').MongoClient;
mongo.connect(url, function(err, dbobj){
if(err) throw err;
const lym = dbobj.db('learnyoumongo');
var prices = lym.collection('prices');
prices.aggregate([{
$match: {
size: process.argv[2]