louischatriot / nedb

The JavaScript Database, for Node.js, nw.js, electron and the browser
MIT License
13.49k stars 1.03k forks source link

Support for nested projections #202

Open Cortys opened 10 years ago

Cortys commented 10 years ago

I think adding support for nested projections, the way MongoDB does (e.g. { "foo.bar":1, baz:1, _id:0 }) would be really useful. As far as I could tell from looking at the code, this should be fairly easy to implement.

This underscore mixin could be used. I haven't tested it though...

Cortys commented 10 years ago

I just created a pull request, that adds this feature.

Yimiprod commented 9 years ago

I'll push your issue top, need it too.

JamesMGreene commented 7 years ago

Looks like this was implemented by @louischatriot in nedb@1.8.0: https://github.com/louischatriot/nedb/commit/0eeca73bb0e313e0d80dafa510a25e6655b0041c