xxxxxxxxxx
onShopSelectionChanged(event) {
const selectedValue = event.option.id;
console.log(selectedValue);
const selectedName = event.option.value;
console.log(selectedName);
}
xxxxxxxxxx
<mat-autocomplete #auto="matAutocomplete" (optionSelected)="onShopSelectionChanged($event)">
<mat-option *ngFor="let shop of shopData" [value]="shop.name" [id]="shop.value">
{{shop.name}}
</mat-option>
</mat-autocomplete>