Hackr.io is hiring Software Engineers at Gurgaon (India)

Meteor Discussion Forums

There's no such thing as a stupid question. Ask. Discuss. Learn.

Name of collection from string variable

I want to write this:

import {MyCollection} from "../../imports/collections/mycollection";

collection = 'MyCollection';

collection.find(); //dont work

i want result simillar as:


Something like in php $$nameOfVariable but for objects
what is the syntax for it please.

Tomáš Burzal 5 months ago
  • Whitelisted Links