I have the following json object
$scope.datos = {
"status":200,
"data":{
"username":"username1",
"nombre": "Diego",
"apellido": "Moreno Leon",
"telefono": "999999",
"celular": "000009901661",
"email": "[email protected]",
"tipo_usuario": 1,
"empresas": [
{
"id_empresa": 1,
"nombre_emp": "Hotel Libertador",
"email": "[email protected]",
"calle_principal": "Av. Eduardo Kingman",
"calle_secundaria": "Catamayo",
"barrio": "Los Arupos",
"numero_casa": "14-14",
"latitud":"-11212121331",
"longitud":"2122112122"
},
{
"id_empresa": 2,
"nombre_emp": "Hotel Loja",
"email": "[email protected]",
"calle_principal": "Av. Pio Jaramillo",
"calle_secundaria": "Meradillo",
"barrio": "San Sebastian",
"numero_casa": "60-45",
"latitud":"-34444444444",
"longitud":"21111111"
}
],
"categorias": [
{
"id_categoria":1,
"nombre_cat":"Gastronomia",
"sitios":[
{
"id_empresa": 1,
"nombre_emp": "Bourbon",
"email": "[email protected]",
"calle_principal": "Av. Pio Jaramillo",
"calle_secundaria": "Meradillo",
"barrio": "San Sebastian",
"numero_casa": "60-45",
"latitud":"-34444444444",
"longitud":"21111111"
},
{
"id_empresa": 2,
"nombre_emp": "La Mojigata",
"email": "[email protected]",
"calle_principal": "Av. Pio Jaramillo",
"calle_secundaria": "Meradillo",
"barrio": "San Sebastian",
"numero_casa": "60-45",
"latitud":"-34444444444",
"longitud":"21111111"
},
{
"id_empresa": 3,
"nombre_emp": "Obelics",
"email": "[email protected]",
"calle_principal": "Av. Pio Jaramillo",
"calle_secundaria": "Meradillo",
"barrio": "San Sebastian",
"numero_casa": "60-45",
"latitud":"-34444444444",
"longitud":"21111111"
}
]
},
{
"id_categoria":2,
"nombre_cat":"Deportes",
"sitios":[
{
"id_empresa": 4,
"nombre_emp": "Coliseo Loja",
"email": "[email protected]",
"calle_principal": "Av. Pio Jaramillo",
"calle_secundaria": "Meradillo",
"barrio": "San Sebastian",
"numero_casa": "60-45",
"latitud":"-34444444444",
"longitud":"21111111"
},
{
"id_empresa": 5,
"nombre_emp": "Coliseo de Machala",
"email": "[email protected]",
"calle_principal": "Av. Pio Jaramillo",
"calle_secundaria": "Meradillo",
"barrio": "San Sebastian",
"numero_casa": "60-45",
"latitud":"-34444444444",
"longitud":"21111111"
},
{
"id_empresa": 6,
"nombre_emp": "Coliseo del Oro",
"email": "[email protected]",
"calle_principal": "Av. Pio Jaramillo",
"calle_secundaria": "Meradillo",
"barrio": "San Sebastian",
"numero_casa": "60-45",
"latitud":"-34444444444",
"longitud":"21111111"
}
]
},
{
"id_categoria":3,
"nombre_cat":"Transporte",
"sitios":[
{
"id_empresa": 7,
"nombre_emp": "Sur Oriente",
"email": "[email protected]",
"calle_principal": "Av. Pio Jaramillo",
"calle_secundaria": "Meradillo",
"barrio": "San Sebastian",
"numero_casa": "60-45",
"latitud":"-34444444444",
"longitud":"21111111"
}
]
},
{
"id_categoria":4,
"nombre_cat":"Bares",
"sitios":[
{
"id_empresa": 8,
"nombre_emp": "La Pupila",
"email": "[email protected]",
"calle_principal": "Av. Pio Jaramillo",
"calle_secundaria": "Meradillo",
"barrio": "San Sebastian",
"numero_casa": "60-45",
"latitud":"-34444444444",
"longitud":"21111111"
},
{
"id_empresa": 9,
"nombre_emp": "Coyote Bar",
"email": "[email protected]",
"calle_principal": "Av. Pio Jaramillo",
"calle_secundaria": "Meradillo",
"barrio": "San Sebastian",
"numero_casa": "60-45",
"latitud":"-34444444444",
"longitud":"21111111"
}
]
}
]
}
};
and I want to show it in the following way
<ul ng-repeat="i in datos">
<li>{{$index}}</li>
<li><input type="button" value="{{i.username}}"></li>
</ul>
But when I show in my html view I have two buttons with the first empty value and the second with the value of username, what I want to know is how I present only the value of username without repeating the empty values in advance I thank you.
Additional data working with bootstrap and with the angularjs version: 1.5.8