0
I have a JSON that has the data of the person and another Collection with "countsJogadors", how do I make my listing also show what is in "contasjogadors"?
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 *ngFor
:
<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>
Where is the
tipo_da_conta
in your JSON? Theoretically it would beconta.contasjogadors.jogador
, for example.– Diego Souza
I tried this way and it won’t come back.
– Ramos
Where is the
tipo_da_conta
in your JSON?– Diego Souza
@Ramos You just need to add another
*nfFor
to the field you want, in case[...] *ngFor="let contasJogadors of contas.contasJogadors; let i = index"[...]
– edson alves
It worked. Thanks a lot @edsonalves
– Ramos
@edsonalves if possible put the answer to mark as solved. Thank you.
– Ramos