I am currently building something in JS and have run into the following scenario:
// these are set programmatically, not like this, just using as an example
var data = {'someData':'blah'};
var widget = 'NameOfWidget';
var command = 'someFunctionName';
// there is a base object that has all widgets and their commands as child objects
// format would be like: UBER.WidgetName.command(data);
// here is how I have tried to call it thus far
UBER[widget][command](data);
window['UBER'][widget][command](data);
I feel like I am close to figuring it out, just need a little help in figuring out exact syntax! Thanks!