I have the following list of students:
students = [{name:'Jordan', passed:true}, {name:'Kyle'},{name:'Jess'},
{name:'Sam', passed:true}
]
I want to be able to, in an HTML template, get the length of the array where the student passed.
Normally I would do:
<div>
{{students.length}}
</div>
However, I want something like this pseudocode...
<div>
{{total length of students who passed}}
</div>
I want to make it so that if I have other buttons on the page that modify students so that when I change whether a student passes or not, the template will automatically reflect the correct number of students.
How can I do this?