I'm trying to make a simple GET request to a JSON file located within my project directory and keep receiving the following: SyntaxError: Unexpected token ]
I don't see any syntactical issues with my JavaScript or JSON. The path to the JSON is correct gives me a 304 response. My JavaScript and JSON are fairly straight-forward:
JavaScript:
// app
var app = angular.module('app', []);
// controllers
app.controller('myController', function($scope, $http){
$scope.data = null;
$http.get('data.json').success(function(data){
$scope.data = data;
console.log($scope.data);
});
});
JSON:
{
"data": [
{
"title": "Test 1",
"description": "Fusce vulputate eleifend sapien."
},
{
"title": "Test 2",
"description": "Vivamus laoreet."
},
{
"title": "Test 3",
"description": "Quisque ut nisi."
},
]
}
What is preventing me from retrieving the data from within my JSON file?