Yo tengo un fichero JSON simple que es el siguiente
Código Javascript:
Ver original
[ { "id": 13, "nombre": "Lelo", "apellidos": "AAA", "birthday": "2015-04-03", "created_at": "-0001-11-30 00:00:00", "updated_at": "-0001-11-30 00:00:00", "extra": { "id": 13, "descripcion": "descripcion13", "created_at": "-0001-11-30 00:00:00", "updated_at": "-0001-11-30 00:00:00" }, "phone": [ { "id": 1, "id_client": 13, "number": 669198862, "created_at": "-0001-11-30 00:00:00", "updated_at": "-0001-11-30 00:00:00" }, { "id": 3, "id_client": 13, "number": 555555555, "created_at": "-0001-11-30 00:00:00", "updated_at": "-0001-11-30 00:00:00" } ] }, { "id": 14, "nombre": "Adrian", "apellidos": "Manuel", "birthday": "2015-04-01", "created_at": "-0001-11-30 00:00:00", "updated_at": "-0001-11-30 00:00:00", "extra": { "id": 14, "descripcion": "descripcion14", "created_at": "-0001-11-30 00:00:00", "updated_at": "-0001-11-30 00:00:00" }, "phone": [ { "id": 2, "id_client": 14, "number": 938465251, "created_at": "-0001-11-30 00:00:00", "updated_at": "-0001-11-30 00:00:00" } ] } ]
Cuándo intento leer el fichero me lee correctamente los datos pero no me hace caso a la hora de leer los números de teléfonos (1:N) , se que tengo que hace run foreach pero no me coje los números , alguna ayuda?
Código HTML:
Ver original
<li ng-repeat="employee in nombres"> ID : {{employee.id}} Email : {{employee.nombre}} Apellido : {{employee.birthday}} Creado : {{employee.created_at}} Actualizado : {{employee.updated_at}} Descripcion : {{employee.extra.descripcion}} - {{employee.id}} - {{employee.created_at}} - {{employee.updated_at}} </li>