having
userGroups: IUserGroup[];
this.service.getUserGroups().subscribe(g => this.userGroups = g);
getUserGroups returns IUserDifferentGroup[] but both IUserGroup and IUserDifferentGroup have the same fields additionally IUserGroup have some more, how to map response to new type ?
interface IUserDifferentGroup{
Name: string;
Code: string;
Id: number;
}
interface IUserGroup {
Id: number;
GroupName: string;
Visible: boolean;
IsDefault: boolean;
CanAssociated: boolean;
}