I'm receiving the following object for example:
var object = {
functions: {
0: 'myFunction',
1: 'alert'
},
parameters: {
0: {
0: 'Testing myFunction...'
},
1: {
0: 'Testing alert...'
}
}
}
After receiving object
variable I want to run all the functions specified with the corresponding parameters.
That is, after receiving the object I want the following to happen:
myFunction('Testing myFunction');
alert('Testing alert');
Is there an elegant way of handling this or is stringconversion into eval the way to go? Some other methods I don't know about?