The data in sakey-data.json file is array of arrays.
[
[ 'Brazil', 'Portugal', 5 ],
[ 'Brazil', 'France', 1 ],
[ 'Brazil', 'Spain', 1 ],
[ 'Brazil', 'England', 1 ]
]
I have been using this factory service to fetch the data.
app.factory('SankeyData', ['$http', function($http){
return $http.get('http://localhost:4000/data/sakey-data.json')
.success(function(data){
return data;
})
.error(function(err){
return err;
});
}]);
It is unable to get data. Rather it shows this error.
SyntaxError: Unexpected token '
There is no syntax error at all. If I change the GET URL to actual JSON format file everything works well.
And moreover I can not change the format of this data in file because Google Graph API needs data in this format.
Please help me find a solution to fetch such files from server using AngularJS.

") rather than single quotes (').transformResponseis overriden.