Angular 7/Typescript : I have a class called `myClass` which looks like the following:
````typescript
    export class myClass
    {
    name: string;
    age: number;
    city: string;
    }
````
I have another class called `people` which looks like:
````typescript
    export class people
    {
    name: string;
    age: number;
    }
````
Within my `component.ts` I have declared a list of type myClass:
````typescript
    listMyClass : myClass[];
````
Which is populated from `ngOnInit()` using data from an API.

I want to create a method in `component.ts` which loops through the `listMyClass` and if the city matches london it gets added to a list of the `people` class.

I thought I would be able to write something outside of `ngOnInit()` along the lines of:
````typescript
    getLondonPeople(){
    
    listPeople : people;
    
    for (let item in listMyClass){
    if(item.city == "london"){
      //something like listpeople.add(item)
    }
    }
    }
````
  
