I have my array of object "messages" i want to calculate the number of items that have "seen:1"
const messages = [
{ id: 66, seen:1, tourist_full_name: "Khouloud Ben Abddallah" },
{ id: 102, seen: 0, tourist_full_name: "Harry Paz Galvez" },
{ id: 103, seen: 0, tourist_full_name: "Harry Paz Galvez" },
{ id: 104, seen: 1, tourist_full_name: "Harry Paz Galvez" },
{ id: 105, seen: 1, tourist_full_name: "Harry Paz Galvez" }
];
for example here i want to create a variable that can be like this
var SeenCount=3 ;
how can i do that ?