I would like to know how to obtain the parallels of each subject in angular js. So far I can get the name but not its parallel Could You Help Me? I have the following JSON:
[
{
"num": "125",
"nom_coe": "Matematicas",
"variacion": " ",
"creditos": "2",
"grupo_creditos": "",
"paralelos": [
{
"paralelo": "B",
"dia": "s/d",
"aula": "NO ASIGNADA",
"hora_inicio": "12:00:00",
"hora_fin": "12:00:00"
}
]
},
{
"num": "855",
"nom_coe": "Historia",
"variacion": " ",
"creditos": "4",
"grupo_creditos": "Genérica",
"paralelos": [
{
"paralelo": "A",
"dia": "Martes",
"aula": "NO ASIGNADA",
"hora_inicio": "10:00:00",
"hora_fin": "13:00:00"
}
]
},
{
"num": "255",
"nom_coe": "Lengua",
"variacion": " ",
"creditos": "3",
"grupo_creditos": "",
"paralelos": [
{
"paralelo": "A",
"dia": "Jueves",
"aula": "NO ASIGNADA",
"hora_inicio": "07:30:00",
"hora_fin": "10:00:00"
}
]
}
]
This is my code:
$scope.datosComp=data;
var length = $scope.datosComp.length;
for ( i=0; i < length; i++) {
alert($scope.datosComp[i].nom_coe);
};
How do I get the parallels?