imlucas/mongodb-datasets — pull request #18 by TZ2016 (2014-07-10 00:00:22+00:00)
Title: Feature/scoping

@imlucas
1. support scoping! (even on embedded document)
2. added relevant tests
3. fix the bug that causes crash when the field data is non-string (_.template(/*must be string*/ arg))

Feature preview:
```json
"scoping": {
"name": "{{chance.name()}}",
"greetings": "This is {{this.name}}. I got ${{this.bank.balance}}.",
"bank": {
"balance": 100
}
}
```

P.S. It's been a rough afternoon. I was completely tortured by the behavior of closure.
```js
var func = [];
for(var i in {one: 1, two: 2}) {
func.push( function() { return i; } );
}
```
Both functions return 'two' because the function does not 'take a snapshot' of the variable.