I have a function that uses an array to set names for different things
var settings = {
slug: "foo"
}
Now, i want to create a variable, whitch name is the value of settings.slug, in this case foo
This obviously does not work:
var settings.slug = new Schema({
title : String
, content : String
});
The only way to do this is to use bracket notation and attach it to an existing object. For example, you could make it a global variable by attaching it to the
globalobject: