assuming i have the followingjson
seats = [
{
rows:[
{
"seatNUmber": "A",
"IsAvailable": true
},
{
"seatNUmber": "B",
"IsAvailable": true
},
{
"seatNUmber": "C",
"IsAvailable": false
},
{
"seatNUmber": "D",
"IsAvailable": true
}
]
},
{
rows:[
{
"seatNUmber": "A",
"IsAvailable": true
},
{
"seatNUmber": "B",
"IsAvailable": true
},
{
"seatNUmber": "C",
"IsAvailable": false
},
{
"seatNUmber": "D",
"IsAvailable": true
}
]
}
I would like to know how can I parse this json
in a list <ul>
? That is, that each seatNumber is in one <li>
of the list. I guess it's a nested Loop but I can't understand how to put the ng-repeat.
The result I want to achieve is something like the following:
Where each box represents an entry and is one <li>
of the list.
Loops nested with
ng-repeat
work like any other loop. An analogy ofng-repeat
using aforeach
would be:Now, using the
ng-repeat
: