How to add array of images from Json to img

I need to get images from this json db


“events”: [


     "AuxID": "5006",

     "VrstaNekretnine": "Stan",

     "TipOglasa": "Prodaja",

     "Status": "Aktivan",

     "Valuta": "EUR",

     "Cena": "143900",

     "images": [








to this code:

        <div class="carousel-item active">





Does someone has a resolution for this problem?

The v-for directive is perfect for this. You can display all images in the array just by doing something like this:

<img v-for="imageUrl in events[0].images" src="imageUrl"/>

See official v-for docs for more info.

I tried and nothing changed. When I put for example in div tag like this {{imageUrl.images}} I get Urls of those picture but in img tag when I set it, nothing happens. :frowning:

Whoops, I forgot a key detail! It should be :src="imageUrl (or v-bind:src="imageUrl"). Sorry about that!

1 Like