The following is the JSON I'm trying to parse:
{[{"name":"Technology"},{"name":"Engineering"},{"name":"Business"}]}
I'm getting the error below:
Unexpected token [ in JSON at position 1
at JSON.parse (<anonymous>)
at fromJson
I'm getting the data from a service and saving it into the controller scope using the following:
vm = this;
vm.sectorList = response.data;
And my HTML:
<div ng-repeat="sector in ctrl.sectorList">
{{sector.name}}
</div>
{keyname:[{"name":"Technology"},{"name":"Engineering"},{"name":"Business"}]}