I'm looping through an array and using a filter to separate my results grouped by day. It works, but now I can't seem to access the variables inside the second loop, where I have the filter.
<ion-list class="list list-inset" ng-repeat="(key, value) in Jobs | groupBy: 'FilterTime'">
<div class="item item-divider"><center>{{key}}</center></div>
<div class="list list-inset" >
<div class="item item-divider"><center>{{JobCount}} jobs</center></div>
<a class="item item-icon-left item-icon-right" href="#/app/viewjob/{{job.BookingPublicId}}" ng-repeat="job in value | groupBy: 'BookingTime'">
<i class="icon ion-android-car "></i>
<h2>{{job.EndAddress1stLine}}</h2>
<p>{{job.StartAddressPostCode}} <b>></b> {{job.EndAddressPostCode}}</p>
<p ng-show="job.Status == 0"><b>Waiting</b> - {{job.BookingTime * 1000 | date:'dd-MM-yyyy hh:mm'}}</p>
<p ng-show="job.Status == 2"><b>Accepted</b> - {{job.BookingTime * 1000 | date:'dd-MM-yyyy hh:mm'}}</p>
<p ng-show="job.Status == 4"><b>Enroute to job</b> - {{job.BookingTime * 1000 | date:'dd-MM-yyyy hh:mm'}}</p>
<p ng-show="job.Status == 6"><b>Waiting for customer</b> - {{job.BookingTime * 1000 | date:'dd-MM-yyyy hh:mm'}}</p>
<p ng-show="job.Status == 8"><b>Job Started</b> - {{job.BookingTime * 1000 | date:'dd-MM-yyyy hh:mm'}}</p>
<p ng-show="job.Status == 10"><b>Complete</b> - {{job.BookingTime * 1000 | date:'dd-MM-yyyy hh:mm'}}</p>
<!--<span class="item-note">{{job.StartAddressPostCode}} > {{job.EndAddressPostCode}}</span>-->
<i class="icon ion-chevron-right "></i>
</a>
</div>
<!--<p>{{value.BookingPublicId}} <b>></b> {{EndAddressPostCode}}</p>-->
</ion-list>
Now, anything in job.variable doesn't load but if I do just job it'll spit out all the json.
As you can see, the grouping works; but I can't see any data. If I spit out just job I get this:
EDIT: The data looks like:
[
{
"BookingPublicId": "C1LY482T",
"BookingTime": 1462238100,
"FilterTime": "03/05/2016",
"BookingName": "",
"Status": 1,
"PassengersName": "John Smith",
"PassengersMobile": null,
"Fare": "544.13",
"StartAddressPostCode": "RG2 0GH",
"StartAddress1stLine": "Drake Way",
"EndAddressPostCode": "M90 1QX",
"EndAddress1stLine": "Drake Way",
"Status1": 1,
"Resp": "OK"
},
{
"BookingPublicId": "ZGX39WNB",
"BookingTime": 1462268100,
"FilterTime": "03/05/2016",
"BookingName": "",
"Status": 1,
"PassengersName": "John Smith",
"PassengersMobile": null,
"Fare": "544.13",
"StartAddressPostCode": "RG2 0GH",
"StartAddress1stLine": "Drake Way",
"EndAddressPostCode": "M90 1QX",
"EndAddress1stLine": "Drake Way",
"Status1": 1,
"Resp": "OK"
}
]

