Here is the JSON data stored in $scope.projectData:
[{
"\"Space\"": "\"L1 (1 floor)\"",
"\"Subject\"": "\"Corridor Distance\"",
"\"Label\"": "\"Corridor Distance\"",
"\"Color\"": "\"#33CCCC\"",
"\"Length\"": "\"193.55\"",
"\"Count\"": "\"0\"",
"\"Multiplier\"": "\"1\"",
"\"TotalFt\"": "\"193.55\"",
"\"TotalCounts\"": "\"\"",
"\"Notes\"": "\"\""},
{
"\"Space\"": "\"L1 (1 floor)\"",
"\"Subject\"": "\"Corridor Distance\"",
"\"Label\"": "\"Corridor Distance\"",
"\"Color\"": "\"#33CCCC\"",
"\"Length\"": "\"210.36\"",
"\"Count\"": "\"0\"",
"\"Multiplier\"": "\"1\"",
"\"TotalFt\"": "\"210.36\"",
"\"TotalCounts\"": "\"\"",
"\"Notes\"": "\"\"" }]
This function exists in my controller:
$scope.csvParse = function(item) {
var array = JSON.parse(item);
console.log(item);
};
And this is how I call it in my HTML:
{{ csvParse(projectData) }}
I am facing issues with my code. Any suggestions on how to fix it?