My webservice return data, I replace unnecessary character and get valid string.
How that string transfer in object.
Example 1 static data (not from web service) work fine.
$scope.str = [];
str = {"car": [{"id": 11,"name": "BMW",}, {"id": 22,"name": "Toyota"}],};
$scope.data = str;
Example 2 data from web service not working
str = data;
str.replace("?", "").replace("(", "").replace(")", "").replace(";", "");
$scope.data = str;
datain line 1 of example 2 is not null or undefined? If it is it will definitely cause problems on the next line.