Thanks again Sir,
Without using group and unwind?
something like this?
{
atm: {
$map: {
input: ‘$am’,
as: ‘o’,
‘in’: {
a: ‘$$o’,
c: {
$cond: {
‘if’: {
or reduce here to count etc?
then: ‘N’,
‘else’: ‘P’
}
},
t: 0
}
}
}
}
Thanks again Sir,
Without using group and unwind?
something like this?
{
atm: {
$map: {
input: ‘$am’,
as: ‘o’,
‘in’: {
a: ‘$$o’,
c: {
$cond: {
‘if’: {
or reduce here to count etc?
then: ‘N’,
‘else’: ‘P’
}
},
t: 0
}
}
}
}