May you can try this:
db.usergroup.find({"_id":"g1"}).forEach(function(doc){
db.user.find({_id:{$in:doc.Users}}).forEach(printjson);
});
2012/3/27 sn <st...@infotain.us>:
> --
> You received this message because you are subscribed to the Google Groups "mongodb-user" group.
> To post to this group, send email to mongod...@googlegroups.com.
> To unsubscribe from this group, send email to mongodb-user...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/mongodb-user?hl=en.
>
--
尽人事,听天命!