Maps an array of objects to an object keyed by the specified key.
Array of objects
Name of key
Object mapping key values to objects
Maps an array of objects to an object keyed by the specified key.