如何使用typescripts解析嵌套的json对象数组并在primeng组件中显示它

时间:2017-12-11 09:44:05

标签: arrays json angular typescript nested

我是Angular js的新手。有一个任务是使用typescripts解析嵌套的json对象数组并在primeng表中显示它。 Primeng绝对是新的。我能够显示平面结构json,但是这个嵌套的对象数组正在产生问题。

我需要在一些主 - 细节关系中展示它。

以下是JSON结构:

[
{
    "baId": "50509060-48e5-4241-a346-f834b22bf4b5",
    "status": "Pending",
    "legalName": "Koch Suppy and Trading LLP",
    "internal": true,
    "baType": "Vendor",
    "creditAddress": [
        {
            "addressSubType": "USA",
            "addressLine1": "F-35 10th Main",
            "addressLine2": "5th Cross Avenue",
            "city": "Los Angeles",
            "county": "Los Angeles",
            "state": "California",
            "country": "US",
            "postalCode": "90001",
            "notes": "District 10"
        }
    ],
    "invoiceAddress": [
        {
            "addressSubType": "USA",
            "addressLine1": "F-35 10th Main",
            "addressLine2": "5th Cross Avenue",
            "city": "Los Angeles",
            "county": "Los Angeles",
            "state": "California",
            "country": "US",
            "postalCode": "90001",
            "notes": "District 10"
        }
    ],
    "finance": [
        {
            "bank": "Citi Bank",
            "routingNumber": "C044072324",
            "accountNumber": "000123456789",
            "wireTransferMethod": "RTGS",
            "intermediaryBank": "Citi Bank",
            "intermediaryRoutingNumber": "C044072327",
            "intermediaryAccountNumber": "000123456789",
            "locationName": "Wichita"
        }
    ],
    "reportingTags": [
        {
            "leiName": "Koch Suppy and Trading LLP",
            "leiNumber": "5299001hxs",
            "782a": "54-2024246",
            "782aCountryIdentifier": "US",
            "782c": "1905-0174",
            "782cCountryIdentifier": "US",
            "cftcClassifications": "Disaggregated Futures",
            "cftcReporting": "Long Format",
            "cftcSefAssoc": "360 Trading Networks, Inc.",
            "emirCategorization": "Financial Counterparties",
            "epaCountryIdentifier": "US",
            "epaNumber": "1234-000",
            "mifidClassifications": "Retail Clients",
            "rfcCode": "EOPAN006",
            "rfcCodeCountryIdentifier": "US",
            "cpCode": "AS101",
            "systemSpecific": "AEDP"
        }
    ],
    "audit": {
        "createdBy": "koch\\malhota1",
        "modifiedBy": "koch\\malhota1",
        "creationDate": "2017-10-20T16:00:00Z",
        "modificationDate": "2027-10-20T16:00:00Z",
        "isCurrent": true
    }
}
]

请使用上面的json帮我创建一个带有primeng的角度项目。感谢快速帮助。

0 个答案:

没有答案