Объект из примера

const entries = [
  ['foo', 'bar'],
  ['baz', 42]
];

Object.fromEntries(entries)
WindMillCode