I have a question that I haven't found the answer to yet. Here is the issue I'm facing:
The JSON data I am working with has this structure:
[{
"batch_queue_name": "Batch One",
"start_date": "12/01/2016 10:18 P.M.",
"end_date": "12/03/2016 01:08 A.M.",
"completion_status": "100"
}, {
"batch_queue_name": "Batch Two",
"start_date": "12/10/2016 12:18 A.M.",
"end_date": "12/11/2016 05:23 P.M.",
"completion_status": "100"
}, {
"batch_queue_name": "Batch Three",
"start_date": "04/01/2017 12:18 A.M.",
"end_date": "06/01/2017 03:21 P.M.",
"completion_status": "60"
}, {
"batch_queue_name": "Batch Four",
"start_date": "05/01/2017 01:25 A.M.",
"end_date": "06/01/2017 12:30 A.M.",
"completion_status": "97"
}, {
"batch_queue_name": "Batch Five",
"start_date": "05/01/2017 12:18 A.M.",
"end_date": "08/01/2017 03:37 A.M.",
"completion_status": "42"
}, {
"batch_queue_name": "Batch Six",
"start_date": "16/10/2016 12:18 A.M.",
"end_date": "18/10/2016 05:23 P.M.",
"completion_status": "100"
}]
When using ng-repeat
, I want to filter out those entries where the completion status is not equal to 100:
<tr ng-repeat="batch in vm.batches | filter: {batch.completion_status:'!'+'100'}">
<td> ... </td>
</tr>
However, I encountered an error message:
Syntax Error: Token '.' is unexpected, expecting [:] at column 28 of the expression [vm.batches |NaNilter: {batch.completion_status != '100%'}] starting at [.completion_status != '100%'}].
Can someone help me understand what mistake I am making here?