I have a JSON object as follows
var jsonData = {
getData1:function(id1, id2){
},
getData2:function(id1, id2){
}
};
I have a method name (eg: getData1) & arguments (id1, id2) in separate variables. these are dynamic.
Manually I can call the method as follows
jsonData.getData1(id1, id2);
but I want to call a method dynamically with passing 2 arguments (id1, id2). what is the correct way to do it?