Last active
August 29, 2015 14:05
-
-
Save pvoznenko/ae9f39b7ac94b2e0c27b to your computer and use it in GitHub Desktop.
hw2.2
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var cursor = db.data.find({}).sort({State: 1, Temperature:-1}); | |
var state = ''; while (cursor.hasNext()) { var data = cursor.next(); if (state != data.State) { state = data.State; db.data.update(data, {$set: {"month_high": true}}); } } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment