title: How to get keys in Object array in Vue.js
body: <p>I have an object array created and it's like this:</p>
  
  <pre><code>for(var i =0; i &lt; this.test.length; i ++){
      var header = this.test[i].hdr;
      var insertData = [];
  
      switch(header){
          case 'date':
              insertData =  {date: "date"};
              break;
          case 'name':
              insertData =  {name: "name"};
              break;
          case 'age':
              insertData =  {age: "age"};
              break;
          case 'add':
              insertData =  {add: "add"};
              break;
      }
      this.hdrtxt.push(insertData);
  }
  </code></pre>
  
  <p>Now, when I try to get the keys of the object, I used this:</p>
  
  <pre><code>Object.keys(this.hdrtxt);
  </code></pre>
  
  <p>The result  is:</p>
  
  <pre><code>(4) ["0", "1", "2", "3"]
  </code></pre>
  
  <p>But the output I want is this:</p>
  
  <pre><code>(4) ["date", "name", "age", "add"]
  </code></pre>
  
  <p>I'm sorry I'm just new to this. How can I attain my goal?</p>