Reputation: 7166
var config = {
xxx : 'foo'
}
var env = {
foo : {
},
bar : {
}
}
How can I use an objects value to retrieve values from another object?
like:
env.config.xxx?
Upvotes: 0
Views: 69
Reputation:
var object1 = { value : 'hello' }
var object2 = { o : object1 }
alert(object2.o.value);
Upvotes: 4