Last active
December 22, 2015 12:09
-
-
Save kf0jvt/6470693 to your computer and use it in GitHub Desktop.
Top Ten largest data breaches in the VCDB by record count. #vcdb #javascript
This file contains hidden or 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
foo = db.vcdb.aggregate([ | |
{ $unwind : "$victim" }, | |
{ $project : { _id : 0, | |
data_total : "$attribute.confidentiality.data_total", | |
incident : "$timeline.incident", | |
victim_id : "$victim.victim_id" } }, | |
{ $sort : { "data_total" : -1 } }, | |
{ $limit : 10 } | |
]); | |
bar = foo['result'] | |
for (var i=0; i < bar.length; i++) { | |
print(bar[i].data_total + " " + bar[i].victim_id + bar[i].incident['year']); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment