Implement `groupBy(arr, key)` returning an object that groups the items by the value of `item[key]`.
Run your code to see results.