In Angular2 find max value for two keys
<p>I am reading from a data file with about 500 entries like:</p>

<pre><code>const LOCKERS: Locker[] = [
  { lockerNumber: 1, room: 'Ladies', size: 'Small'},
  { lockerNumber: 2, room: 'Ladies', size: 'Small'},
  { lockerNumber: 3, room: 'Ladies', size: 'Small'},
  { lockerNumber: 4, room: 'Ladies', size: 'Small'},
  { lockerNumber: 1, room: 'Ladies', size: 'Large'},
  { lockerNumber: 2, room: 'Ladies', size: 'Large'},
  { lockerNumber: 3, room: 'Ladies', size: 'Large'},
  { lockerNumber: 1, room: 'Gents', size: 'Small'},
  { lockerNumber: 2, room: 'Gents', size: 'Small'},
  { lockerNumber: 3, room: 'Gents', size: 'Small'},
  { lockerNumber: 1, room: 'Gents', size: 'Large'},
  { lockerNumber: 2, room: 'Gents', size: 'Large'},
  { lockerNumber: 3, room: 'Gents', size: 'Large'},
  { lockerNumber: 4, room: 'Gents', size: 'Large'}
];
</code></pre>

<p>My service is like this:</p>

<pre><code>import { Injectable } from '@angular/core';
import { Locker } from './locker';
import { LOCKERS } from './mock-lockers';

@Injectable()
export class LockerService {
    getLockers() {
        return Promise.resolve(LOCKERS);
    }
}
</code></pre>

<p>And my component:</p>

<pre><code>import { Component } from '@angular/core';
import { Locker } from './locker';
import { LockerService } from './locker.service';

@Component({
  selector: 'my-app',
  templateUrl: './app/app.locker.html',
  providers: [LockerService]
})

export class AppComponent {
  title = 'The lockerrooms';
  lockers: Locker[];
  ladiesSmall: number;
  ladiesLarge: number;
  gentsSmall: number;
  gentsLarge: number;

  constructor(
    private lockerService: LockerService

  ) { }

  getLockers() {
    this.lockerService.getLockers()
      .then( data =&gt; this.lockers = data)
  }

  ngOnInit() {
    this.getLockers();
  }
}
</code></pre>

<p>I am looking for a way to get the maximum lockerNumber for each room-size combination. 
Excepted Result-</p>

<pre><code>MaxLadiesSmall 4
MaxLadiesLarge 3
MaxGentsSmall 3
MaxGentsLarge 4
</code></pre>