Group data from JSON in callback function in Typescript
I need to write a function groupBy that groups the people in the JSON data using a function given. Below is the interface and JSON data: interface Person { name: string; yearOfBirth: number; placeOfBirth: string; } const input: Person[] =…