Object.fromEntries() - JavaScript | MDN
The Object.fromEntries() static method transforms a list of key-value pairs into an object.