Insert document from another collection and insert to array?


I have a document _id from

var thisurl_catId = Router.current().params._id;

1. I have a collection “COL1” with and document and that document I want to insert into another collection “COL2” with the thisurl_catId


COL1DATA field 


   // Insert a category into the collection
     parentId: thisurl_catId,
     fromcol1: COL1DATA,
     userid: Meteor.userId(),
     createdAt: new Date() // current time

Howto get the COL1DATA and insert it to COL2?

2. hotwo make a array and insert new objects into it later?

If I have a field and what more document objects into it and later on I what to insert more objects.


No one have just a little tip so I can make the meteor app?


Mongo’s $push adds an element to an array field, and if the field doesn’t exist yet, it creates it first.


I didn’t understand your first question. Do you want to insert to COL2 with id value thisurl_catId ? What is preventing you from inserting same data into both collections ?