title: Push Object to Array in Vue JS / JavaScript
body: <p>I have this response from HTTP call:</p>
  <p><a href="https://i.stack.imgur.com/hsJrF.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/hsJrF.png" alt="enter image description here" /></a></p>
  <p>It's an Array. Now, In my vue JS application I have a <code>projectFieldOptions</code> empty array property.</p>
  <blockquote>
  <p>projectFieldOptions: [],</p>
  </blockquote>
  <p>Now, I want to make a object like that:</p>
  <p>{
  value : item // that response each array item name
  text : item / /that response reach array item name
  }</p>
  <p>and want push it to <code>projectFieldOptions</code> emtpy array. So to do this I am using this code:</p>
  <pre><code>http.post(&quot;projects/import/&quot;, this.importData)
  .then((response) =&gt; {
      let res = response.data;
      console.log(res);
      if (res.status == &quot;pending&quot;) {
          setTimeout(function () {
              this.callHttp();
              this.loadDone = true;
          }, 5000);
      } else {
          this.loadDone = false;
          res.forEach(function(item){
              _this.projectFieldOptions.push({ value : item, text : item  });
          });
          console.log(this.projectFieldOptions);
      }
  })
  .catch((error) =&gt; {
      console.log(error);
  });
  this.countHTTP++;
  </code></pre>
  <p>Here, You can see that I push to that empty array using this code:</p>
  <blockquote>
  <p>_this.projectFieldOptions.push({ value : item, text : item  });</p>
  </blockquote>
  <p>But when I <strong>console.log</strong> this <code>projectFieldOptions</code> array I can see that array <strong>item</strong> is not parsing and showing me <strong>item</strong> as text not the actual <strong>item</strong> value. I mean it's showing this:</p>
  <p><a href="https://i.stack.imgur.com/aY8Yj.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/aY8Yj.png" alt="enter image description here" /></a></p>
  <p>My questions is:</p>
  <ol>
  <li>Why it's not adding the actual array item value to that empty array ?</li>
  <li>why it's showing <strong>Ob</strong> (Observer) ?</li>
  </ol>