Sometimes you inherit a database full of junk. Maybe the previous developer put data in the database keys, which causes Variety to go out of memory when run. After you've run the `logKeysContinuously` to figure out which subkeys may be a problem, you can use this option to run Variety without those subkeys.
Analyzing a large collection on a busy replica set primary could take a lot longer than if you read from a secondary. To do so, we have to tell MongoDB it's okay to perform secondary reads
by setting the ```slaveOk``` property to ```true```:
...
...
@@ -177,6 +200,11 @@ To persist to an alternate MongoDB database, you may specify the following param
Variety expects keys to be well formed, not having any '.'s in them (mongo 2.4 allows dots in certain cases). Also mongo uses the pseudo keys 'XX' and keys coresponding to the regex 'XX\d+XX.*' for use with arrays. You can change the string XX in these patterns to whatever you like if there is a conflict in your database using the `arrayEscape` parameter.
//skip over inherited properties such as string, length, etch
if(!document.hasOwnProperty(key)){
continue;
}
varvalue=document[key];
//objects are skipped here and recursed into later
//if(typeof value != 'object')
if(Array.isArray(document))
key=config.arrayEscape+key+config.arrayEscape;//translate unnamed object key from {_parent_name_}.{_index_} to {_parent_name_}.arrayEscape{_index_}arrayEscape.
result[parentKey+key]=value;
//it's an object, recurse...only if we haven't reached max depth