https://designtechworld.medium.com/how-to-convert-an-array-of-objects-into-one-object-in-javascript-7b7a6882bd0e