I have an array of objects as the following;
[{"A":"34"},{"B":"13"},{"C":"35"},{"D":"74"}]
If the key is A, it's value has to be multiply by 30,B by 10,C by 5,D by 2. I would like to calculate the total sum after the multiplication;
34*30 + 13*10 + 35*5 + 74*2
Is there a way to achieve this other than an if/else statement? Thanks!