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
COL1
COL1DATA field
COL2
// Insert a category into the collection
Categories.insert({
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.