I'm trying to grab brad pitt's movie titles from this JSON data, but I keep getting the error:
"trying to parse JSON data. getting error "bad control character in string literal at line 7 column 131 of the JSON data"
Here's my Angular 1 Controller:
angular.module('superActorQuiz.question', [])
.controller('questionController', function ($scope, $http, $window) {
console.log('in questionController')
$scope.movie;
$http.get("themoviedb_data.json")
.then(function (response) {
console.log('results',response.data);
$scope.games = response.data.results[0].title.map(function(item) {
console.log(item)
return item;
});
})
})
And here's the first part of the JSON data of brad pitt's movies. Line 7 would be where the overview starts for the movie Fury. I've tried my controller code, the http.get, with other json objects and it works. Any ideas on why I'm getting that error with this Json data?
{
"page": 1,
"results":
[{
"poster_path": "\/il9XWx5CbNd2KdDUwrcClEZiLkv.jpg",
"adult": false,
"overview": "Last months of World War II in April 1945. As the Allies make their final push in the European Theater,
a battle-hardened U.S. Army sergeant in the 2nd Armored Division named Wardaddy commands a Sherman tank called \"Fury\" and its five-man crew on a deadly mission behind enemy lines. Outnumbered and outgunned,
Wardaddy and his men face overwhelming odds in their heroic attempts to strike at the heart of Nazi Germany.",
"release_date": "2014-10-15",
"genre_ids": [10752,
18,
28],
"id": 228150,
"original_title": "Fury",
"original_language": "en",
"title": "Fury",
"backdrop_path": "\/pKawqrtCBMmxarft7o1LbEynys7.jpg",
"popularity": 11.717304,
"vote_count": 2435,
"video": false,
"vote_average": 7.43
}, {
"poster_path": "\/adw6Lq9FiC9zjYEpOqfq03ituwp.jpg",
"adult": false,
"overview": "A ticking-time-bomb insomniac and a slippery soap salesman channel primal male aggression into a shocking new form of therapy. Their concept catches on,
with underground \"fight clubs\" forming in every town,
until an eccentric gets in the way and ignites an out-of-control spiral toward oblivion.",
"release_date": "1999-10-14",
"genre_ids": [18],
"id": 550,
"original_title": "Fight Club",
"original_language": "en",
"title": "Fight Club",
"backdrop_path": "\/8uO0gUM8aNqYLs1OsTBQiXu0fEv.jpg",
"popularity": 7.681482,
"vote_count": 5581,
"video": false,
"vote_average": 8.07
}, {
"poster_path": "\/p11Ftd4VposrAzthkhF53ifYZRl.jpg",
"adult": false,
"overview": "The men who made millions from a global economic meltdown.",
"release_date": "2015-12-11",
"genre_ids": [18,
35],
"id": 318846,
"original_title": "The Big Short",
"original_language": "en",
"title": "The Big Short",
"backdrop_path": "\/jmlMLYEsYY1kRc5qHIyTdxCeVmZ.jpg",
"popularity": 6.207392,
"vote_count": 1395,
"video": false,
"vote_average": 7.26
}]}
Thanks so much!