title: Javascript: Convert map to array of objects
body: <p>I am new to programming in general and am looking to convert a Javascript map into array of objects. For example, convert the input constant into the output constant:</p>
  <pre><code>const input = new Map([
     [1, 'one'],
     [2, 'two'],
     [3, 'three'],
  ]);
  
  const output = [
      { number: 1, letter: 'one' },
      { number: 2, letter: 'two' },
      { number: 3, letter: 'three' }
  ];
  </code></pre>
  <p>This might be a simple code but I cannot find any reference. Any advice? Thanks!</p>