I have a multi dimensional array I want to print all data with check box. there is dietry_reqs array below in the code I want to create check box with these value which value is true that will selected. How to put dietry_reqs in ng-repeat
{
"attendance":[
{
"id":"13",
"event_booking_id":"19",
"seat_type":"",
"fname":"",
"lname":"",
"email":"",
"company":"",
"dietry_reqs":[
{
"id":1,
"name":"delhi",
"value":false
},
{
"id":2,
"name":"mumbai",
"value":false
},
{
"id":3,
"name":"ahmedabad",
"value":false
}
],
"attend_status":"0",
"created":"2016-05-04 11:41:28"
}
]
}
This is my code I have not written all fields code. I called check box like that but i am getting response as below image
<div class="row" ng-repeat="itemse in items track by $index">
<div class="col-md-1">
<div class="form-group" mod="itemse">
<select class="form-control" name="seat_type" ng-model="itemse.seat_type">
<option ng-selected="selected" value="Table">Table</option>
<option value="Individual">Individual</option>
</select>
</div>
</div>
<div class="col-md-2">
<div class="form-group" mod="itemse">
<input type="text" class="form-control" name="fname" placeholder="First Name" ng-model="itemse.fname" focus/>
</div>
</div>
<div class="col-md-2">
<label ng-repeat="itemcheck in itemse.dietry_reqs track by $index">
<input type="checkbox" value="{{itemcheck.value}}">{{itemcheck.name}}
</label>
</div>
</div>
