I want to programmatically reach a method that is nested inside a object.
var app = {
property:{
method:function(){},
property:"foo"
}
}
Normally you would access it like so: app.property.method
But in my case, In runtime I get a string that I want to interpolate that into calling the method
function
Now, how can method
be accessed programmatically when i have the following string
"app.property.method"
For a reference please see: http://jsfiddle.net/adardesign/92AnA/