I would like to know how to execute a JavaScript function by taking its name from the database. Example:
data["nome_coluna"] // essa será a informação que estará no banco. (exemplo: somar();)
// Aí o objetivo é executar essa função dentro de um if.
if(data["nome_coluna"] != ""){
data["nome_coluna"];
}
Is there a way to do this? Is this form wrong? If so, how?
NOTE: The purpose of this is to make when I buy a card and it has a function that should happen immediately, so call the function that is saved in the database. As there are many cards, it is not feasible to be doing an if for each card, since they are different functions.