I have this Json
all_subjects: [
{
id: 1,
subject_code: "COMP101",
description: "Knowledge Work Software & Presentation ",
name: "",
grade: [
{
id: 103,
subject_id: "1",
user_id: "17",
grade: "F",
reviewed: "0"
},
{
id: 104,
subject_id: "1",
user_id: "16",
grade: "F",
reviewed: "0"
}
]
},
my view
<tbody v-for="subject in subjects">
<tr>
<td>
<span> @{{ subject.subject_code }}</span>
</td>
<td>
<span> @{{ subject.description }} </span>
</td>
<td>
<span> @{{ subject.grade.grade->count() }} </span>
</td>
<td><span> <div class="btn btn-crimson btn-inline-block"><a href="#" data-toggle="modal" data-target="#myModal" class="btn-view-more">View more info</a></div> </span></td>
</tr>
</tbody>
how do I count the that is F. I received the json value using vue.resource this.$http.get throught API Call. I'm trying this @{{ all_subjects.grade.grade->count() }} it doesn't work. I wanted to count the subjects failure inside the v-for loop in vue.js what are the ways around this?