Hi Pablo,
You need an Array notation because your data is held inside an array and not and Associative array. In your example you are using:
$scope.test = [ // Outer container is an array with a single [object | associative array] inside .
{ "seasonTeamHigh": [
{"teamScratchGame" : [
{"score" : 1210, "name" : "LEWIS CONCRETE"},
{"score" : 1204, "name" : "CLASSIC SPORTS"},
{"score" : 1197, "name" : "Team 17"}
]},
{"teamScratchSeries" : [
{"score" : 3276, "name" : "RANCHO NICASIO"},
{"score" : 3248, "name" : "COWBOYS AND ALIENS"},
{"score" : 3239, "name" : "CLASSIC SPORTS"}
]},
{"someKey": [
{"score": 1234, "name": "someName"},
{"score": 999, "name": "anotherName"}
]}]
}];
To get to "score" you have to use "item in test[index].seasonTeamHigh.[teamScratchGame | teamScratchSeries | someKey]"
To do what you want you either have to use array notation as Paul suggested or your service should return and associative array instead.
$scope.test = { // Outer container is a single [object | associative array] inside .
"seasonTeamHigh": [
{"teamScratchGame" : [
{"score" : 1210, "name" : "LEWIS CONCRETE"},
{"score" : 1204, "name" : "CLASSIC SPORTS"},
{"score" : 1197, "name" : "Team 17"}
]},
{"teamScratchSeries" : [
{"score" : 3276, "name" : "RANCHO NICASIO"},
{"score" : 3248, "name" : "COWBOYS AND ALIENS"},
{"score" : 3239, "name" : "CLASSIC SPORTS"}
]},
{"someKey": [
{"score": 1234, "name": "someName"},
{"score": 999, "name": "anotherName"}
]}]
};
To get to "score" you have to use "item in test.seasonTeamHigh.[teamScratchGame | teamScratchSeries | someKey]"
Have fun
Jorge
--
-------------------------------
Jorge Sousa