How to transfer [oject object] to array now

It is such a simple HTTP request file and I had my statement page like this:


and my website: JSON file is this:https://reqres.in/api/products/3.
And I got an error message: core.js:4197 ERROR Error: Cannot find a differ supporting object ‘[object Object]’ of type ‘object’. NgFor only supports binding to Iterables such as Arrays.
I searched through the google doc and realize that we cannot use response.json() since the response now already is a JSON file.
When I tried other suggestion and it doesn’t work in my file because I then got an error message: Property ‘data’ does not exist on type ‘Object’ when I tried:

    this.server.get('https://reqres.in/api/products/3').subscribe(
      response => this.result = response.data);
      console.log(this.result);
  }

can someone give me a way transfer this object type to an array that can easily display in my html when using *ngFor in:

                <ion-title *ngFor = "let data of result">
                  {{data.text}}
                </ion-title>

Screenshots of textual information are worthless. Please post textual information as text. So, since I have no idea what is in your image, I can only refer you to this post.

2 Likes