Looking for a solution in JavaScript to transform an array that contains objects into a new object format.
The initial array:</p>
[ { Id:1, Name:'' }, { Id:2, Name:'' }, { Id:3, Name:'' } ]
Desired result:
{ Id:[1, 2, 3] }
Any suggestions on how to accomplish this task?