how to get list of ids to string object with comma in angular

I have drop down with

 userList =[ { id: "0",name: "ALL"},{id: "1",name: "Smith"},{id: "2",name: "Smith"},{
 id: "3", name: "RAM"}];

when select ALL option i need to get all id’s of user into string object.

string str = {1,2,3}(not include 0)

 <mat-select placeholder="User"(ngModelChange)="modelChanged($event)" formControlName="user" name="user">
  <mat-option *ngFor="let data of userList" [value]="data.id">{{data.name}}  </mat-option>
  </mat-select>

my Typescrpt :

 onChangeRole(): void {
        this.userRoleService.getUserDetails().subscribe((response: Response) => {
            if (response.failure) {
                this.modalPopupService.openPopup(AlertComponent, { message: response.error });
            } else {
                this.userList = response.result;
                const all = {
                    id:  0,
                    name:  'ALL'
                   };
                   this.userList.splice(0, 0, all);
            }
        });
    }

modelChanged(res): void {
        const userType = res;
        if (userType === 0) {
         this.userType = ???;
        } else {
            this.userType = userType;
        }
    }

Above this.usertype is any property.

How to get that list of ids into string object?

Source: New feed
Source Url how to get list of ids to string object with comma in angular