I have this array of object:
let choices = [
{title: 'Single Card Payment', func: 'singleCard'},
{title: 'Monthly Card Payment', func: 'monthlyCard' },
{title: 'Monthly Direct Debit Payment', func: 'monthlyDD'}
]
I'm looping through with it and I would like to call functions with the value of the func, like this (which is obviously wrong)
for(choice for choices) {
choice.func('some', 'params');
}