i want to pass a dynamic object to mat-select component and also pass the input key of object , that should be used in [value]
by mat-option.
here mat-select
<mat-select [placeholder]="field.label" [formControlName]="field.name">
<mat-option *ngFor="let item of field.options" [value]="item">{{item}}</mat-option>
</mat-select>
in place of item it should be dynamically object key .e.g if i pass this array like to iterate
[{name:'hassa',id:1}]
for loop and i want to pass id
as use in [value]="item"
in mat-option
but it should be dynamic object can be changed