Hello, I'm trying to write a function that would convert an array of objects, like [{one: 'eno'}, {two: 'owt'}] to {eno: {...}, owt: {...}}.
So far I've come up with this snippet but I'm not sure where to go next. I need makeSomethingFromObjects function to receive an array of objects with specific type and only return object with keys of the objects it received. I hope I'm making sense, basically if function can receive an array of 3 different objects and only 2 objects are passed, the return value should also contain (and hint) for only the 2 objects received.
Also it would be nice if I could make sure passed array cannot have duplicates of those objects, so if {one: 'eno'} is in array it cannot be passed again. Is that somehow possible?