I'm using Monger to connect to Mongo. I want to run
db.collection.find().forEach(function(x) { db.collection-two.insert(...) })
I can't see a relevant 'for each' entry in the Monger docs or a way to pass in JavaScript to insert into another collection. How do I do this?
EDIT this question was based on a misunderstanding (forEach
lies in the client API not on the server API). I would delete it but I can't.