I have a Entries looks like
[Title] => test - Title - 33
[readedBy] => Array (0 => 5999,
1 => 85343
)
[clickedBy] => Array (
)
[deletedBy] => Array (
)
And i want to Check in my GROUP reduce function
function (obj, prev) {
obj.readedBy.forEach(function (doc){
if(doc == 800){
prev.status1.push(obj);
}else{
prev.status2.push(obj);
}
});
}
If is there my ID in the Relevan Array to push it to the right Status Array. Foreach is no solution, because that ID array grows > 100k . Is there a good way? Or is that solution rubbish ?