I have an array of objects that I want to iterate through and sum some values if the keys exist in the sumList array and average all others. How can we best achieve this?