0
In the following image this represented the answer that I receive when calling an API of the Solr server, I would like to take item by item and make available to the user a thumbnail with the video url and its description below.
code used to receive Sponse:
const btn = document.querySelector('#search-submit');
const field = document.querySelector('#search');
const baseURI = 'http://localhost:8983/solr/csv_indexing';
btn.addEventListener('click', () => {
const query = encodeURIComponent(field.value);
const url = baseURI + '/select?q=' + query;
fetch(url).then(response => {
console.log(response);
response.json().then(myList => {
console.log(myList)
})
}).catch(error => {
console.error(error);
});
})
HTML:
<input id="search" type="text" name="" class="buscar-txt" placeholder="Pesquisar..."/>
<button type=button id="search-submit" class="buscar-btn">
How do I access these JSON values in a loop so that I can list the video thumbnails followed by their descriptions?