Javascript data transformer exercise Write a function that would take this sample data: [ { banana: 'fruit' }, { apple: 'fruit' }, { carrot: 'vegetable' } ] and generate this data: { fruit: [ 'banana', 'apple' ], vegetable: 'carrot' }