I need to have my data in a form like this to be able to do 2 nested `ngFor` loops:

```
this.groupedCities = [
  {
    label: 'Germany', value: 'de', 
      items: [
        {label: 'Berlin', value: 'Berlin'},
        {label: 'Frankfurt', value: 'Frankfurt'},
        {label: 'Hamburg', value: 'Hamburg'},
        {label: 'Munich', value: 'Munich'}
      ]
  },
  {
    label: 'USA', value: 'us', 
      items: [
        {label: 'Chicago', value: 'Chicago'},
        {label: 'Los Angeles', value: 'Los Angeles'},
        {label: 'New York', value: 'New York'},
        {label: 'San Francisco', value: 'San Francisco'}
        ]
  },
];

```

But my back end only supplies it like this:

```
this.data = [         
  {label: 'Berlin', value: 'Berlin', country: 'Germany'},
  {label: 'Frankfurt', value: 'Frankfurt', country: 'Germany'},
  {label: 'Hamburg', value: 'Hamburg', country: 'Germany'},
  {label: 'Munich', value: 'Munich', country: 'Germany'}
  {label: 'Chicago', value: 'Chicago', country: 'USA'},
  {label: 'Los Angeles', value: 'Los Angeles', country: 'USA'},
  {label: 'New York', value: 'New York', country: 'USA'},
  {label: 'San Francisco', value: 'San Francisco', country: 'USA'}
];

```

I seem to remember a way to do this in rxjs but I can't remember it.