title: Angular2 Http get
body: <p>I am trying to be pull data from API using Angular2, and bind it to view. After request been done, my component only gets array object <strong>[object Object],[object Object],[object Object]</strong>. Can I get any help on extracting the object so that <strong>"*ngFor"</strong> can read each object. I want to be able to bind data to view.</p>
  
  <pre><code>**This is my API**
  [{
      _id: "578c8c670f3cd0941efb337c",
      name: "John",
      gender: "Male",
      age: "34",
      __v: 0,
  },
  {
      _id: "5794a90f96391dcc2436e43f",
      name: "Valur",
      gender: "Male",
      age: "22",
      __v: 0,
  },
  {
      _id: "5794abad70df28541eab170b",
      name: "Paul",
      gender: "Male",
      age: "43",
      __v: 0,
  }]
  </code></pre>
  
  <p>UserService is like:</p>
  
  <pre><code>import { Http } from 'angular2/http';
  constructor(private _http: Http) { }
  
  getuser(): Observable&lt;any&gt; {
       return this._http.get('http://localhost:1000/api/users')
       .map(res =&gt; res.json());
  }
  </code></pre>
  
  <p>This my angular with service that handle request.</p>
  
  <pre><code>import { UserService } from '../services/userservice';
  
  constructor(private userService: UserService) { }
  _data: Object;
  
  getUser():void {
      this.userService.getuser()
        .subscribe(data =&gt; this._data = data,
        error =&gt; console.log(error));
  
      console.log(this._data); //this part doesn't pull data at all.
  }
  
  
  //My view
  &lt;div *ngFor="#u of _data"&gt;
     {{u.name}} //this part gives me an error
  &lt;/div&gt;
  
   //But when i try to pull data from "subscribe" like this:
  &lt;div&gt;
     {{_data | json }} //data is available
  &lt;/div&gt;
  </code></pre>