This is my JSON data format.
{
"0": {
"id": "1",
"image": "/images/brands/surf_excel.png",
"name": "Surf Excel",
"productCount": "6"
},
"1": {
"id": "2",
"image": "/images/brands/rin.png",
"name": "Rin",
"productCount": "5"
},
"2": {
"id": "3",
"image": "/images/brands/ariel.png",
"name": "Ariel",
"productCount": "4"
}
}
When i am trying to assign this data like this..
$scope.Brands = [];
$scope.Brands = data; // Not an array error
Basically i want to assign data and access one by one.
How to fix this error?