Dear I have this code consuming this api in json, I need to show in the div or class homeworld, the name of the planet, they tell me that I have to make an additional request entering the service route figure the homeworld item which has a url with the corresponding planet but as I can do to show the name what I have been able to show the url text but not the name its help please, and I have not been able to structure how to do it, I leave the code that I have. thanks.
$(document).ready(function() {
$.getJSON('https://swapi.co/api/people/', function(datos) {
var output = '<article class="row">';
$.each(datos.results, function(i, item) {
output += '<div class="col">';
output += '<div class="inner">';
output += '<div class="name">' + item.name + '</div>';
output += '<div class="height"><strong>Altura :</strong> ' + item.height + '</div>';
output += '<div class="hair_color"><strong>Color de Cabello :</strong> ' + item.hair_color + '</div>';
output += '<div class="birth_year"><strong>Cumpleaños :</strong> ' + item.birth_year + '</div>';
output += '<div class="homeworld">' + item.homeworld + '</div>';
output += '</div>';
output += '</div>';
});
output += '</article>';
$('.container').html(output);
});
});
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script>
<section>
<h2>Personajes Star Wars</h2>
<div class="container">
<div class="row"><span>Cargando...</span></div>
</div>
</section>