# Show \[Object,Object\] after iterate the array in html in ionic 3?

**URL:** <https://forum.ionicframework.com/t/show-object-object-after-iterate-the-array-in-html-in-ionic-3/125643>\
**Category:** ionic-v3\
**Created:** [March 23, 2018, 11:28am UTC](https://forum.ionicframework.com/t/show-object-object-after-iterate-the-array-in-html-in-ionic-3/125643 "2018-03-23T11:28:08Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![RomnEmpire](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/romnempire/32/124028_2.png) [@RomnEmpire](https://forum.ionicframework.com/u/RomnEmpire)\
**Post date:** [March 23, 2018, 11:28am UTC](https://forum.ionicframework.com/t/show-object-object-after-iterate-the-array-in-html-in-ionic-3/125643/1 "2018-03-23T11:28:08Z")

</div>

Hello to all,  
I have to show the selected categoryObject inside the model but in my case i show[Object,object] inside the model tell m anyone how to fix this and how to show selected object in the model?  
```  
type or paste code here

```auto
    public categoryObject :any;
	private userSubCategoriesDtos :any = [];
	constructor(
			public params: NavParams,
			public viewCtrl : ViewController
		) {
		this.categoryObject = this.params.get('categoryObject');
		this.userSubCategoriesDtos = this.categoryObject.userSubCategoriesDtos;
	}

		<ion-list *ngFor="let subCatgory of userSubCategoriesDtos">
			<ion-label>{{subCatgory}}</ion-label>
		</ion-list>
```

---

<div class="post-metadata">

**Author:** ![bandito](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/bandito/32/94980_2.png) [@bandito](https://forum.ionicframework.com/u/bandito)\
**Post date:** [March 23, 2018, 7:49pm UTC](https://forum.ionicframework.com/t/show-object-object-after-iterate-the-array-in-html-in-ionic-3/125643/3 "2018-03-23T19:49:03Z")

</div>

What is the format of the data you are expecting? I would say you would need to map through the array and maybe iterate through the object in order to see the value you want.

.map for the array and inside the .map method use “for in” for the object.

---

<div class="post-metadata">

**Author:** ![RomnEmpire](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/romnempire/32/124028_2.png) [@RomnEmpire](https://forum.ionicframework.com/u/RomnEmpire)\
**Post date:** [March 24, 2018, 4:47am UTC](https://forum.ionicframework.com/t/show-object-object-after-iterate-the-array-in-html-in-ionic-3/125643/4 "2018-03-24T04:47:51Z")

</div>

sir,  
i have to iterate this array this.categoryObject.userSubCategoriesDtos how to use with map method?.

---

<div class="post-metadata">

**Author:** ![bandito](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/bandito/32/94980_2.png) [@bandito](https://forum.ionicframework.com/u/bandito)\
**Post date:** [March 28, 2018, 11:52pm UTC](https://forum.ionicframework.com/t/show-object-object-after-iterate-the-array-in-html-in-ionic-3/125643/5 "2018-03-28T23:52:25Z")

</div>

sorry for the late reply but my recommendation would be to check out the Mozilla Developer Network as they have a better explanation that I could give you.

but I would do something lke this:

`myArray.map(myObject => display.show(myObject.myProperty) );`

where display.show() is a made up object and method and you should use your own.

EDIT: DIsregard, I must be blind.

In your case:

```auto
<ion-list *ngFor="let subCatgory of userSubCategoriesDtos">
	<ion-label>{{subCatgory.myProperty}}</ion-label>
</ion-list>

```

but again I don’t know the **format** of the data you’re expecting so I can’t help you further.

---

<div class="post-metadata">

**Author:** ![mhartington](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/mhartington/32/137757_2.png) [@mhartington](https://forum.ionicframework.com/u/mhartington)\
**Post date:** [July 19, 2021, 9:43pm UTC](https://forum.ionicframework.com/t/show-object-object-after-iterate-the-array-in-html-in-ionic-3/125643/6 "2021-07-19T21:43:59Z")

</div>

Closed on July 19, 2021, 9:43pm UTC


