Following is my code:
const keyToDisplayMessage = 'REGULAR_HOME';
const cf = format(
{
accountName: this.accountName,
},
this.pageData.sucessMessages.keyToDisplayMessage,
this.$route.name
);
return cf;
In this keyToDisplayMessage does not get replaced by REGULAR_HOME. However, if I directly use it like
this.pageData.sucessMessages.REGULAR_HOME
then it works.
How can I access keyToDisplayMessage inside the format function?