const thumbnail = [
{url: "https://randomUrlForImages.com"},
{url: "https://randomUrlForImages2.com"}
]
I want to access url for displaying image
I’m using
<img src = {thumbnail.url} />
and its not working.
also tried using {thumbnail.0.url}
{thumbnail"[url]"}
>Solution :
When facing these issues try consoling the values you try to get…
Like here you can try
console.log(thumbnail[0].url)
or you can also use console.log(thumbnail[0]["url"])
if this works then you can delete the console logs and use it in the image code…