I have an object like this:
options: {
'Signature': "[Customer First Name] [Customer Last Name]"
'First Name': "[Customer First Name]"
'Last Name': "[Customer Last Name]"
}
And I need to convert it so that the values become functions that use that value like this:
options: {
'Signature': function(){ this.insertHTML('[Customer First Name][Customer Last Name]'); }
'First Name': function(){ this.insertHTML('[Customer First Name]'); }
'Last Name': function(){ this.insertHTML('[Customer Last Name]'); }
}
But I'm not sure how to do this. So as an example I want to be able to do something like:
var newOptions = functionify(options);