Convert an array to object using a specified key
Source array which contains objects
Key of the objects in the source array
Convert an array to object using a specified key