Say I have an array of string elements ["1", "2","3"] that I wish to sum. However, I cannot just use the formula .sum because it would combine the string elements to return "123" instead of 6.
How can I convert the array to integer elements for summation?
Hi Saul, we do not have a formula to convert the string elements into integer elements. However, this can be done using a simple ruby code laid out in this recipe. The code takes care of the conversion into integers as well as the summation.
Send us a ticket, we will try our best to assist you with your problem