Hello ,
I am new to crm dynamics 365 javascripts.
How we can calculate sum the amounts that we got in the form of array ?
for (var i = 0; i < results.value.length; i++)
{
var totalamount = results.value[i]["totalamount"]; // contains value like 300, 545, 500 etc
var chargetype = results.value[i]["chargetype"]; // contains charge type value like 1234, 3456, 1234 etc
}
I want sum of total amount whose charge type = 1234 (some value of the option set)
How we can achive this using javascript?
Thank you.
*This post is locked for comments