Retrieving data from an array of URL in a json object consumed from an api

Viewed 16

I am trying to access the data from the URL which is in the form of array in a JSON object using Angular 8. I tried doing it using for loop, but I am getting multiple errors. Please help me in resolving this.

Below is the JSON structure: { "title": "A New Hope", "episode_id": 4, "characters": [ "https://swapi.dev/api/people/1/", "https://swapi.dev/api/people/2/", "https://swapi.dev/api/people/3/", "https://swapi.dev/api/people/4/", "https://swapi.dev/api/people/5/", "https://swapi.dev/api/people/6/", "https://swapi.dev/api/people/7/", "https://swapi.dev/api/people/8/", "https://swapi.dev/api/people/9/", "https://swapi.dev/api/people/10/", "https://swapi.dev/api/people/12/", "https://swapi.dev/api/people/13/", "https://swapi.dev/api/people/14/", "https://swapi.dev/api/people/15/", "https://swapi.dev/api/people/16/", "https://swapi.dev/api/people/18/", "https://swapi.dev/api/people/19/", "https://swapi.dev/api/people/81/" ] "created": "2014-12-10T14:23:31.880000Z", "edited": "2014-12-20T19:49:45.256000Z", "url": "https://swapi.dev/api/films/1/" }

0 Answers
Related