Actually a have a array with this data
"Stage" : {
"ID01" : {
"abeb5220-2003-4b8b-a6d5-853a40ca7d60" : "Full name"
}
}
And use this code to display the value of objects
<ng-container *ngIf="hasProperty(vaga.stage, stage.code)">
<div
ngxDraggable
(drag)="dragCandidate($event)"
class="candidate ngx-dnd-item"
[model]="{
codCandidate: candidate,
nameCandidate: vaga.stage[stage.code][candidate],
codeLastStage: stage.code,
codeLastVAga: vaga.id
}"
*ngFor="let candidate of objectKeys(vaga.stage[stage.code]); let i = index"
>
{{ vaga.stage[stage.code][candidate] }}
</div>
hasProperty Method
hasProperty(obj, property) {
// debugger;
return typeof obj == "object" && obj.hasOwnProperty(property);
}
I'm adding more data and the new array structure would be like this
"Stage" : {
"ID01" : {
"abeb5220-2003-4b8b-a6d5-853a40ca7d60" : {
"email" : "[email protected]",
"name" : "Full name"
}
}
}
The question is: How display "name" value with changes above?
question from:
https://stackoverflow.com/questions/65885855/get-and-display-objectkeys-values 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…