title: get value of a property from array of objects
body: <p>I'm building angular2 app with TypeScript and i came across a problem (note that i'm a noob in angular2 and typescript). </p>
  
  <p>Problem is identical to this: <a href="https://stackoverflow.com/questions/19590865/from-an-array-of-objects-extract-value-of-a-property-as-array">From an array of objects, extract value of a property as array</a> but since i'm not using JavaScript, provided solution isn't very helpful (or is it?)</p>
  
  <p>I'm getting JSON objects from API and simply save them in array:</p>
  
  <pre><code>constructor(private namelistService: NameListService) { }
  
  getAllDevices(){
  this.namelistService.getDevices()
  .subscribe(
    data =&gt; this.devices = data,
    error =&gt; console.log('Server error'),
  );
  }
  </code></pre>
  
  <p>also my simple service:</p>
  
  <pre><code>constructor(private http:Http){}
  
  getDevices(): Observable&lt;any&gt;{
      return this.http.get("http://link-to-api")
      .map( (res: Response) =&gt; res.json())
      .catch((error: any) =&gt; Observable.throw(error.json().error || 'Server error'));
  }
  </code></pre>
  
  <p>resulting in objects like this (i deleted the values):</p>
  
  <pre><code>{
  "_id": "",
  "info": {
    "device_id": ,
    "device_name": "",
    "uid": "",
    "firmware": "",
    "hardware": "",
    "description": ""
  },
  </code></pre>
  
  <p>All i want to do is to get the _id values from every object in array and save it in seperate array: 
      arr2 = [id1, id2, id3, id4, ... ]</p>