タイプスクリプトでVSTS APIからの応答を処理する方法に苦労します。REST APIの複雑な応答からのTypescriptインターフェイス
このインターフェイスを処理する方法はありますか?私はループに試してみる私のコードで
export interface Fields {
'System.AreaPath': any;
'System.TeamProject': string;
'System.IterationPath': string;
'System.WorkItemType': string;
'System.State': string;
'System.Reason': string;
'System.AssignedTo': string;
'System.CreatedDate': Date;
'System.CreatedBy': string;
'System.ChangedDate': Date;
'System.ChangedBy': string;
'System.Title': string;
'Microsoft.VSTS.Feedback.ApplicationType': string;
'System.Description': string;
'System.History': string;
'Microsoft.VSTS.Feedback.ApplicationStartInformation': string;
'Microsoft.VSTS.Feedback.ApplicationLaunchInstructions': string;
}
フィールド(作業項目===フィールド)
<tbody>
<tr *ngFor="let workitem of workItems">
<!-- *ngFor="let field of workitems.fields" -->
<td>{{workitem.fields.System.AreaPath}} << THIS IS NOT ALLOWED</td>
</tr>
</tbody>
はいずれも、これを解決する方法を素晴らしいアイデアを得ましたか。
item.fields [ 'name.with.dots'] –