Do I really have to first convert it into an array of arrays of key-value pairs?
No, an iterator of key-value pair arrays is enough. You can use the following to avoid creating the intermediate array:
function* entries(obj) { for (let key in obj) yield [key, obj[key]];}const map = new Map(entries({foo: 'bar'}));map.get('foo'); // 'bar'