I’m new to Meteor and Mongo so there’s a good chance that this is an easy solve, but I’ve been racking my brains for days and can’t figure out a way to do it.
Basically, I have a collection that contains a bunch of documents that render to a web page as a list. When I user chooses an item, that item corresponds to a collection whose name matches the ID of the item. So once selected, I want to retrieve the contents of the collection that is referenced by that document.
In effect I want to be able to dynamically update:
dynamicCollection = new Mongo.Collection(selectedItemId);
Where selectedItemId is a dynamically updated variable based on a user selection.
I’ve tried using global and window references but just keep getting errors when calling find().