I created jsfiddle and it works -- http://jsfiddle.net/volkhin/YGgzL/, I only added result object as var result = {a: 1, b: 2};
. The only things that comes to my mind is that result is not simple object. It definitely will not work for null, undefined, numbers and so on.
Edit:Then I believe it's due to getters/setters. And it would be better to avoid modifying such object because modifying it can lead to unknown consequences inside mongoose. If you just need to access some data in this object you can try create shallow copy (for example, using underscorejs _.clone or manually iterating over its keys) which will return simple object. Which you can modify, of course. But I'm not sure if it will contain all the data -- again, it might heavily depend on getters/setters.