I have a List of cars assigned to a person for a particular month. If you search April you will get April data. How do I access Nested JSON data via Index?
Here's plunker
$scope.cars = $scope.results[resultIndex].cars.map(function(car) {
return {
make: car.Make,
year: car.Year
};
});
$scope.showCars = function(resultIndex) {
$scope.cars = $scope.results[resultIndex].cars;
};
Aucun commentaire:
Enregistrer un commentaire