Hi, I have a problem …
My variable is stated like this:
resultado = {
conta: {},
planos_disponiveis: new Array<any>()
};
Searching for json:
ionViewDidLoad() {
let eu = this;
this.MercadoLivreProvider.get('plano','86851104').then(retorno => {
const dados = (retorno as any);
const objeto_retorno = JSON.parse(dados._body);
eu.resultado = objeto_retorno;
console.log(JSON.stringify(eu.resultado.planos_disponiveis, null, 4));
});
}
I get a json formatted as follows:
[ [ { "nome": "carlos" }, { "nome": "joao" } ], [ { "nome": "nissius" }, { "nome": "ribas" } ]
My HTML looks like this:
<ion-card *ngFor="let plano of resultado.planos_disponiveis">
<ion-card-header class="usuario">
<ion-icon name="md-person"></ion-icon>
</ion-card-header>
<ion-list *ngFor="let info of plano">
<p><b>{{info.nome}}</b> é seu plano atual que vai vencer dia xx/xx/2020.</p>
</ion-list>
</ion-card>
Why the mistake ??
Any examples to help me?