How to display an array of object?

Im new in ionic for few weeks. Im really appreciate for any help you guys contribute.

I got an array of object. i already display it but it show [object Object],…
So how to display the object in array?

Thankyou guys!Capture

Hi, @amirarshad96
Can you please share your code here?

Use *ngFor to iterate over object array.

Ex: details contain Array

public details:any=[];
constructor(public navCtrl: NavController,public http: Http ,public navParams: NavParams) {
             .subscribe(res => {this.details = res.json(); });

<div *ngFor="let item of details">

import { Component } from ‘@angular/core’;
import { NavController, NavParams } from ‘ionic-angular’;
import { Observable } from ‘rxjs/Observable’;
import { Http } from ‘@angular/http’;
import ‘rxjs/add/operator/map’;

selector: ‘page-profile’,
templateUrl: ‘profile.html’,
export class ProfilePage {

result3 : any = ;
data: Observable;

constructor(public navCtrl: NavController, public navParams: NavParams, public http: Http) {

try() {

.map(res => res.json())
.subscribe((data:any) => {
  this.result3 = data;

}, error => {


Okay then now in HTML file you can write like this:

<div *ngFor="let key of result3">

and this will display your array.
Hope it helps!!!

its work! Thankyou sir for helping me :grin:

1 Like

Welcome @amirarshad96 Please mark it as solution so, that it will be useful for other persons also.

Hi sir. Thankyou for the reply, your concept is also same as @addwebsolution . Really appreciate with ur helps

1 Like