Created
June 23, 2014 21:37
-
-
Save L1fescape/2e58a1ad1a8753c26d5a to your computer and use it in GitHub Desktop.
All keys in mongodb db. Not very efficient.
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
var keys = []; | |
db.domains.find().forEach(function(doc) { | |
for( key in doc ){ | |
if( keys.indexOf(key) === -1 ){ | |
keys.push(key); | |
} | |
} | |
}); | |
print(keys); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment