Object from tuples

The Object.fromEntries function produces an object from an array of tuples, where the first element of each tuple is the key and the second element is the value.

Loading TypeScript...

Note that Object.fromEntries requires your TypeScript compiler target to be set to ES2019 or later.

Was this page helpful?