I'm aware that I could do this:
var myClass = { /* my class definition */ };
var methodName = 'myMethod';
myClass[methodName](p1,p2,...,pN);
But what should I do if have this:
if(data.someMethodName[0]!== undefined){ ... }
or
data.someMethodName[i].someAttribute
How do I call someMethodName dynamically meaning calling it as a string?
data[someMethodName]()if I understand you correctly.