Forum Discussion
Marsha_R
Moderator
if myObj and myAction are both strings, then something like this should work:
eval(myObj + '.' + myAction)
AlexKaras
7 years agoChampion Level 3
And if myObj is an object, like in your example, then something like this should work:
eval(myObj.FullName + '.' + myAction)
- s21_shankar7 years agoNew Contributor
AlexKaras the solution works as charm. Thanks for the solution.
- s21_shankar7 years agoNew ContributorNopes as mentiined above myobj is an object and myactiin is a string.
Thanks for the response. - s21_shankar7 years agoNew ContributorThanks for the solution. I will try and let you know if it works.
Related Content
- 11 years ago
Recent Discussions
- 11 hours ago
- 7 days ago
- 10 days ago