My script fetches JSON data and extracts a list of actors stored in an array called 'cast'. To display the first actor from this list, I use the following JavaScript...
let movieCredits = document.getElementById("movieCredits");
movieCredits.innerHTML = out.credits.cast[0].name;
The actor information is then shown in a div like so...
<div id="movieCredits"></div>
I want to display the first 5 results instead of just the first one. Is there an easy way to achieve this?