I have autocomplete input
<div formArrayName="addresses"> <div class="row" *ngFor="let itemrow of searchForm.controls.addresses.controls; let i=index" [formGroupName]="i"> <mat-form-field> <input type="text" class="form-control" id="address" formControlName="address" matInput [matAutocomplete]="auto" (keyup)="getESRI($event.target.value)" (focusout)="bindLocation($event.target.value)"> <mat-autocomplete #auto="matAutocomplete"> <mat-option *ngFor="let option of testLocation" [value]="option.text"> {{ option.text }} </mat-option> </mat-autocomplete> </mat-form-field> </div> </div> "testlocation":[{"text":"Euronet","magicKey":"dHA9MSNubT1FdXJvbmV0I2NzPTE5OjExI3NjPURFVQ==","isCollection":true},{"text":"Euronet","magicKey":"dHA9MSNubT1FdXJvbmV0I2NzPTE5OjExI3NjPURFVQ==","isCollection":true}]
When I'm trying add value [value]="option.magicKey it shows in the input option.magicKey when I select option. I need option.magicKey only as the value, and option.text as the input option. Otherwise how to add option.magicKey as parameter to bindLocation($event.target.value) function?