title: How do i get values of id’s And also how do i merge multiple objects into single array into javascript
body: <p><a href="https://i.stack.imgur.com/qJp1m.png" rel="nofollow noreferrer">please click me</a>
  How do i get values of id’s And also how do i merge multiple objects into single array</p>
  
  <p>Also for more reference i have an object here and i want values of id's from it</p>
  
  <pre><code>var myObj = {
  
       "cars": [
          {
             "id": 1,
             "name": "Ford",
             "models": ["Fiesta", "Focus", "Mustang"]
          },
          {
             "id": 2,
             "name": "BMW",
             "models": ["320", "X3", "X5"]
          },
          {
             "id": 3,
             "name": "Fiat",
             "models": ["500", "Panda"]
          }
      ]
  }
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/qJp1m.png" rel="nofollow noreferrer">please click me</a>
  And how do i print id's in the browser like</p>
  
  <p>id - 1
  name - ford</p>
  
  <p>id - 2
  name - BMW </p>
  
  <p>.......</p>
  
  <p>like so</p>