My goal is to extract the initial value ("source") from the given JSON file
{
"slides": [{
"source": "images/Carousel-01.jpg",
"title": "Slide 1 Title",
"caption": "Slide 1 Description"
}, {
"source": "images/Carousel-02.jpg",
"title": "Slide 2 Title",
"caption": "Slide 2 Description"
}]
}
I am attempting to retrieve the value using AngularJS with this code snippet
<div ng-repeat="img in slides">
<img ng-src="{{img.slides[0].source}}" />
</div>
However, it consistently displays an empty field and I am unsure about how to specifically get the first or last value. I'm uncertain if this is achievable as I strive to build a carousel.