title: Javascript - Convert object to array object
body: <p>Try to convert the following object (which was getting from an API response) to an array object.</p>
  <pre><code>const oldObj = {
      Georgia : {
          notes: &quot;lorem ipsum&quot;,
          lat: &quot;32.1656&quot;,
          long: &quot;82.9001&quot;
      },
      Alabama : {
          notes: &quot;lorem ipsum&quot;,
          lat: &quot;32.3182&quot;,
          long: &quot;86.9023&quot;
      }
  }
  </code></pre>
  <p>My expected like bellow:</p>
  <pre><code>const desireArray = [
      {
          name: &quot;Georgia&quot;,
          notes: &quot;lorem ipsum&quot;,
          lat: &quot;32.1656&quot;,
          long: &quot;82.9001&quot;
      },
      {
          name: &quot;Alabama&quot;,
          notes: &quot;lorem ipsum&quot;,
          lat: &quot;32.3182&quot;,
          long: &quot;86.9023&quot;
      }
  ];
  </code></pre>
  <p>Try to do with forEach but, I think it's not the way, seemed returned me the error.</p>
  <pre><code>oldObj.forEach((el, i) =&gt; {
      console.log(el);
  });
  </code></pre>
  <blockquote>
  <p>TypeError: oldObj.forEach is not a function</p>
  </blockquote>
  <p>Any help?</p>