I tried to use:
MongoInternals.defaultRemoteCollectionDriver().mongo.db.listCollections()
in order to get all collection names in meteor database, but it returns a very long JSON, in which i couldn't find the pure collection names. (see the attached image)
How can I get meteor collection names in a following format:
["test1", "test2", "users"...]

listCollectionsreturns aMongoCollectionwhich you would iterate over, calling.getNamespace()to get the names. Please note the returned value you are seeing is not JSON but rather the console's interpretation of the object, hence items such as[Function]