I have an Object like this:
myComponent.ts
this.detailsStruct = this.newParameter.struct;
//the value of detailsStruct is:
//{0: "something",
// 5: "somethingElse"}
where the data of detailsstruct are coming from my mongoDb and I want to have an input form that displays keys and values of my object. In the html I did something like that:
myComponent.html
<div class="form-group" *ngFor="let s of detailsStruct ; let i = index">
<div class="input-group">
<input type="text" class="form-control" [ngModelOptions]="{standalone:
true}"
[(ngModel)]="s.value" placeholder="" name="{{s[i]}}">
</div>
</div>
I am trying to get something from my object but what I wrote does not work. Any suggestions? Thanks