I'm working on a Vuejs project where I need to filter out only the questions with reviewed:true
and get the count of them. However, I'm encountering an error while using the code below:
TypeError: question.reviewed.includes is not a function
. Can someone suggest a better approach to achieving this?
Check out the JSON file screenshot here: JSON File
filterReviewed() {
return this.questions.filter((question) => {
return (
question.reviewed.includes('true')
);
});
},