Dyno Nobel Interview Question

write a function that takes an array of objects and transforms it into a new array