响应机构;
[
{
"professionalId": {
"cib_code": "30003",
"thirdPartyId": "RS30004"
},
"nationalIdentifier": "984538926",
"nationalIdType": "SIREN"
},
{
"professionalId": {
"cib_code": "30003",
"thirdPartyId": "RS30008"
},
"nationalIdentifier": "944316926",
"nationalIdType": "SIREN"
}
]
通过使用来自DB的休息调用获取json响应:
this.thirdpartyServices.getThirdparties().subscribe(data=>this.thirdpartyapis$=data);
在 **thirdpartyapis**
对象中获得Json数组响应之上的给定
但我想要另一个可以包含简单格式的数据的对象
[
{
"cib_code": "30003",
"thirdPartyId": "RS30004"
"nationalIdentifier": "984538926",
"nationalIdType": "SIREN"
},
{
"cib_code": "30003",
"thirdPartyId": "RS30008"
"nationalIdentifier": "944316926",
"nationalIdType": "SIREN"
}
]
想要在Typscript中映射我的数据,以便可以在Html中使用相同的对象来显示Grid表中的数据Kindly Suggest in angular 2 Typescript
1 回答
也许你可以使用解构,
您也可以从中导入'map',