How can I execute stored function from mongodb. I found solution with db.eval(), but it suitable for me.
For example i have document like this:
{
email: '[email protected]',
mobile: +38000000,
user: function(user) {
return user.lastName + ' ' + user.firstName
},
}
Can I somehow execute this function in node.js?
I've tried to get this field and pass it to new Function constructor, it didn't work, also tried to use eval() with it, and also nothing happened.
Maybe there is another way? Would be appreciate for any advise
systemcollection and can be used in query refer this link dirolf.com/2010/04/05/…