Find on different collections to create a document using mongoose

Posted in IT StuffTagged , ,

I need to query multiple collections to prepare a MongoDB document and then save it using Mongoose and NodeJS. The solution is to use async.parallel I have two source collections, Robot, Target and the destination collection Activity. For first, async must be added: var async = require(’async’);var async = require(‘async’); then: async.parallel({   robotFind: function(cb)….