I wanted to replace desig
values in my string formula to evaluate the expression.
I have an array such as:
var value_array = [
{value: "1", desig: "ABM"},
{value: "2", desig: "LF"},
{value: "3", desig: "DM"},
{value: "4", desig: "CM"},
{value: "5", desig: "AN"}
];
And the formula is:
(ABM+ABM)* LF*(DM*LF)+CM+AN *AN/LF
I should get:
(1+1)* 2*(3*2)+4+5 *5/2
then I will evaluate the string which resulted from 40,5
.
Thanks for your help.