It’s very easy to copy a javascript object in jQuery using jQuery.extend() function call. I am curious is there any way to do the same task in mongodb shell?
It’s very easy to copy a javascript object in jQuery using jQuery.extend() function call.
Share
Ok So if you see here:
http://www.mongodb.org/display/DOCS/Overview+-+The+MongoDB+Interactive+Shell#Overview-TheMongoDBInteractiveShell-.mongorc.js
You will see:
This .mongorc.js allow you to define custom functions and what not for collection objects and db objects.
To go further here is an example stolen from an unsuspecting gist user: https://gist.github.com/1640154
Hope it helps,