title: OrderBy Pipe is not Working on array of objects in angular 4?
body: <p>I have a array of objects and i want to sort them according to size which is a attribute of the object . Object consists of {name , size}.i want to sort the elements according to size.</p>
  
  <p>service:</p>
  
  <pre><code>search(term: string): Observable&lt;Array&lt;Object&gt;&gt; {
    let apiURL = `${this.apiRoot}?search=${term}`;
    return this.http.get(apiURL)
             .map(res =&gt; {
               return res.json().results.map(items =&gt; {
                 return {name: items.name, population: items.population};
               });
             });
  }
  </code></pre>
  
  <p>component:</p>
  
  <pre><code> ngOnInit() { 
    this.myshared.getSaveBtnStatus().subscribe(data =&gt; this.isSuccess = data);
      this.searchField = new FormControl();
      this.searchField.valueChanges
      .debounceTime(400)
      .distinctUntilChanged()
      .switchMap(term =&gt; this.myservice.search(term))
      .subscribe(value =&gt; {
        this.results = value;
        console.log(this.results);
      }
      );
  </code></pre>
  
  <p>HTML:</p>
  
  <pre><code>&lt;ul class="list-group"&gt;
  &lt;li class="list-group-item"  *ngFor="let items of results"&gt;
  {{items.name | orderBy : ['population'] }}
  &lt;/li&gt;
  &lt;/ul&gt;
  </code></pre>