I have a 'const' that returns an array of objects. Inside each of these objects is a key for 'image' and inside that object is a value for 'url' as shown below.
const images =[
{
"image": {
"url": "imageUrlHere"
}
},
{
"image": {
"url": "imageUrlHere"
}
},
{
"image": {
"url": "imageUrlHere"
}
}
]
I can access each of these values individually by specifying an array index as seen below:
const imageUrls = images[0].image.url;
But what I need, is to create a new array from all of the image.url values, so I can output all of the images on my page.
Thanks!