0
I have taken a Json from an API that returns this result:
[
{
"marca_id": 4,
"modelo_id": 2708,
"versao_id": 65344,
"cor": "Azul",
"opcionais": [
{
"opcional_id": 6,
"opcional_nome": "Airbags"
},
{
"opcional_id": 10,
"opcional_nome": "Freios ABS"
},
{
"opcional_id": 18,
"opcional_nome": "Ar Condicionado"
},
{
"opcional_id": 22,
"opcional_nome": "Direção Hidráulica"
},
{
"opcional_id": 19,
"opcional_nome": "Bancos de Couro"
}
],
"valor": "40000,00",
"kilometragem": 97437,
"imagens": [
"imagem"
],
"thumbs": [
"miniatura.jpg"
],
"url_ficha_registro": "0001",
"loja": "4555"
}
]
How do I access to print on an ng-repeat all items in the "optional" field? Because if I print type {{x.opcional}} or {{x.opcional[3]}} it returns me the array, logical. It may seem a somewhat silly question but I’m really banging my head with it, having an ng-repeat inside another?
Hello Ivan, unfortunately it didn’t work. It prints in the source code the following: <!-- ngRepeat: x.opcional as dice --> Some other idea?
– Fábio Duarte
Thanks van, I found the answer now! Brawl!
– Fábio Duarte
Dude, I traveled, that’s right, in case it was "given in x.opcional" :D
– Ivan Ferrer