title: how to push all objects keys to a separate array in array using angular or javascript?
body: <p>I have array of objects like this </p>
  
  <pre><code>let array = [
   {'name' : 'Jack', 'age':23},
   {'name': 'Robin', 'age':25}
  ];
  </code></pre>
  
  <p>and I want an array like this </p>
  
  <pre><code>[
   ['Jack',23],
   ['Robin',25]
  ]
  </code></pre>
  
  <p>I tried this code </p>
  
  <pre><code>var myArr = []; 
  
  var input = [
    {name : 'Jack', age : 23},
    {name : 'Robin', age : 25}
  ];
  
  input.forEach((item,index)=&gt;{
    for (var k in item) { 
      myArr.push(item[k]);
    }
  })
  </code></pre>
  
  <p>But it is producing result like this </p>
  
  <pre><code>["Jack", 23, "Robin", 25]
  </code></pre>