We have an api that returns an array with lot of integer values (more than 10k items within array). Need to calculate % value of each item in array and return new array.
Ex:
"Array": [ 600, 100, 300, 400, 999, 50, 0, 0, 10,.....]
"Percentage": 10
Newarray = [60,10,30,40, 999, 5, 0, 0 , 1....]
Looking for a simple way to return an array using Linq or Lambda expression instead of looping through each item of array using Foreach.
Thanks!!!