Explique le code suivant :
export const arrayMapper = (arr: Array<any>, key: string) => {
  return arr.reduce((acc, entry) => {
    acc[entry[key]] = entry;
    return acc;
  }, {});
}; Respond with more than 500 words.
user