60
rated 0 times
[
65]
[
5]
/ answers: 1 / hits: 26037
/ 7 Years ago, thu, december 21, 2017, 12:00:00
How can I count all objects in an array that match a condition: is_read == true
?
This is how my array looks like:
[
{
id: 1,
is_read: true,
},
{
id: 2,
is_read: true,
},
{
id: 3,
is_read: false,
},
{
id: 4,
is_read: true,
},
]
More From » arrays