JSON with dua collections, how to access in AngularJS 2x?

0

I have a JSON that has the data of the person and another collection with "accountsPogadors", how do I make my listing also show what is in "accountsplayers"?

My JSON:

{
    "nome": "Ramos Janones",
    "email": "[email protected]",
    "cpf": "03472925698",
    "celular": "34996320391",
    "telefone": "",
    "cep": "38300070",
    "endereco": "DEZESSEIS",
    "cidade": "Ituiutaba",
    "estado": "Minas Gerais",
    "bairro": "",
    "complemento": "",
    "usuario": "ramos",
    "senha": "teste123",
    "idppoker": "",
    "nickppocker": "ramosinfo",
    "numero": "",
    "_id": "5bf18c512af2e61ab879d2f7",
    "createdAt": "2018-11-18T15:59:13.735Z",
    "updatedAt": "2018-11-26T15:41:00.806Z",
    "__v": 0,
    "id": "5bf18c512af2e61ab879d2f7",
    "foto": {
        "_id": "5bfc140dbe257a17900442a1",
        "name": "8.jpg",
        "sha256": "Mt3053NTSRC81wiHOEMubEUagRAPlHOR-MtPvf2yKgQ",
        "hash": "36cdc8491d7b4fa1817bed8126b3143e",
        "ext": ".jpg",
        "mime": "image/jpeg",
        "size": "58.46",
        "url": "/uploads/36cdc8491d7b4fa1817bed8126b3143e.jpg",
        "provider": "local",
        "related": [
            "5bf18c512af2e61ab879d2f7"
        ],
        "createdAt": "2018-11-26T15:41:01.003Z",
        "updatedAt": "2018-11-26T15:41:04.113Z",
        "__v": 0,
        "id": "5bfc140dbe257a17900442a1"
    },
    "contasJogadors": [
        {
            "agencia": "3251",
            "digito_agencia": "4",
            "numero_conta": "10000",
            "digito_conta": "4",
            "_id": "5bfeedf374e1f00d88e22f83",
            "createdAt": "2018-11-28T19:35:15.130Z",
            "updatedAt": "2018-11-28T19:37:09.715Z",
            "__v": 0,
            "id": "5bfeedf374e1f00d88e22f83",
            "jogador": "5bf18c512af2e61ab879d2f7",
            "tipocontas": null,
            "bancos": null
        }
    ]
}

My List with *ngFo r:

<ol *ngFor="let conta of contas; let i = index">
                    <li><strong>Dados Bancários: </strong> Tipo da conta: {{conta.tipo_da_conta}} - Banco: {{conta.nome_banco}} <br/>Agencia: {{conta.agencia}}-{{conta.digito_agencia}} - Conta: {{conta.numero_conta}}-{{conta.digito_conta}}</li>
                </ol>
    
asked by anonymous 28.11.2018 / 21:37

0 answers