Quantcast
Channel: Ionic Framework - Ionic Forum
Viewing all articles
Browse latest Browse all 49316

Ionic4 show data with ngFor inside an Object which is inside an Object

$
0
0

@dzakyr wrote:

Im trying to show some data from Api, but the data I need is inside an object which is inside an object. how do I get it?

Im trying to get “full_url” inside data object, which is inside avatar object. I already tried:

<ion-list>
    <ion-item *ngFor="let user of users.data">
        <ion-label>
            <h2>{{ user.uname }}</h2>
            <p *ngFor="let data of user.avatar.data">{{ data.url }}</p>
        </ion-label>
    </ion-item>
</ion-list>

Here’s the Api Response Structure:

Response I got is:

Error: Cannot find a differ supporting object ‘[object Object]’ of type ‘object’. NgFor only supports binding to Iterables such as Arrays.

Posts: 1

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 49316

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>